iser-target: Remove redundant local variable
authorSagi Grimberg <sagig@mellanox.com>
Sun, 29 Mar 2015 12:52:08 +0000 (15:52 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Apr 2015 06:27:51 +0000 (23:27 -0700)
No need for this assignment.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c

index 5b086b3ba9a91c6c794f508f440232137fe32893..ae09561f73990c8cab3b48266b67a98f12b09abf 100644 (file)
@@ -1385,13 +1385,12 @@ isert_rx_opcode(struct isert_conn *isert_conn, struct iser_rx_desc *rx_desc,
 {
        struct iscsi_hdr *hdr = &rx_desc->iscsi_header;
        struct iscsi_conn *conn = isert_conn->conn;
-       struct iscsi_session *sess = conn->sess;
        struct iscsi_cmd *cmd;
        struct isert_cmd *isert_cmd;
        int ret = -EINVAL;
        u8 opcode = (hdr->opcode & ISCSI_OPCODE_MASK);
 
-       if (sess->sess_ops->SessionType &&
+       if (conn->sess->sess_ops->SessionType &&
           (!(opcode & ISCSI_OP_TEXT) || !(opcode & ISCSI_OP_LOGOUT))) {
                isert_err("Got illegal opcode: 0x%02x in SessionType=Discovery,"
                          " ignoring\n", opcode);