[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567FDC8A.6000602@users.sourceforge.net>
Date: Sun, 27 Dec 2015 13:41:46 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-rdma@...r.kernel.org, target-devel@...r.kernel.org,
Doug Ledford <dledford@...hat.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Roi Dayan <roid@...lanox.com>,
Sagi Grimberg <sagig@...lanox.com>,
Sean Hefty <sean.hefty@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 2/2] InfiniBand-iSER-target: One jump label less in
isert_reg_sig_mr()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 27 Dec 2015 12:54:52 +0100
This issue was detected by using the Coccinelle software.
1. Let us return directly if a call of the function "isert_set_sig_attrs"
or "ib_post_send" failed.
2. Delete the jump label "err" then.
3. Return zero as a constant at the end.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/infiniband/ulp/isert/ib_isert.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 8a51c3b..9b22db0 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2660,7 +2660,7 @@ isert_reg_sig_mr(struct isert_conn *isert_conn,
memset(&sig_attrs, 0, sizeof(sig_attrs));
ret = isert_set_sig_attrs(se_cmd, &sig_attrs);
if (ret)
- goto err;
+ return ret;
sig_attrs.check_mask = isert_set_prot_checks(se_cmd->prot_checks);
@@ -2688,7 +2688,7 @@ isert_reg_sig_mr(struct isert_conn *isert_conn,
ret = ib_post_send(isert_conn->qp, wr, &bad_wr);
if (ret) {
isert_err("fast registration failed, ret:%d\n", ret);
- goto err;
+ return ret;
}
fr_desc->ind &= ~ISERT_SIG_KEY_VALID;
@@ -2706,8 +2706,7 @@ isert_reg_sig_mr(struct isert_conn *isert_conn,
isert_dbg("sig_sge: addr: 0x%llx length: %u lkey: %x\n",
rdma_wr->ib_sg[SIG].addr, rdma_wr->ib_sg[SIG].length,
rdma_wr->ib_sg[SIG].lkey);
-err:
- return ret;
+ return 0;
}
static int
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists