[PATCH] fix returnvar.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fengguang Wu <fengguang.wu@xxxxxxxxx>

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@xxxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

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

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

--- 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux