diff mbox

fix returnvar.cocci warnings

Message ID 20180418153934.GA69092@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_obj.c:122:5-8: Unneeded variable: "err". Return "0" on line 126


 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_obj.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_obj.c
+++ b/drivers/infiniband/sw/rfc/rfc_obj.c
@@ -119,11 +119,9 @@  struct device *rfc_dma_device(struct rfc
 int rfc_prepare(struct rfc_dev *rfc, struct rfc_obj_info *obj,
 		struct sg_table *rsg, u32 *crc)
 {
-	int err = 0;
-
 	*crc = 0xABCD;
 
-	return err;
+	return 0;
 }
 
 static int rfc_send_blk(struct sg_table *rsg, int len, void *data);