diff mbox

fix returnvar.cocci warnings

Message ID 20180418153934.GA69153@lkp-sb05 (mailing list archive)
State Not Applicable
Headers show

Commit Message

kernel test robot April 18, 2018, 3:39 p.m. UTC
From: Fengguang Wu <fengguang.wu@intel.com>

drivers/infiniband/sw/rfc/rfc_verbs.c:1152:5-8: Unneeded variable: "err". Return "- 1" on line 1155


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 7b62371a9e64 ("RDMA over Fibre Channel")
CC: Muneendra <muneendra.kumar@broadcom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 rfc_verbs.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/infiniband/sw/rfc/rfc_verbs.c
+++ b/drivers/infiniband/sw/rfc/rfc_verbs.c
@@ -1149,10 +1149,8 @@  static int rfc_map_mr_sg(struct ib_mr *i
 
 static int rfc_attach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)
 {
-	int err = -1;
-
 	// multicast not supported in rfc v1.0
-	return err;
+	return -1;
 }
 
 static int rfc_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)