linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init()
@ 2020-05-29 10:03 Dan Carpenter
  2020-05-29 13:34 ` Marciniszyn, Mike
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2020-05-29 10:03 UTC (permalink / raw)
  To: Mike Marciniszyn, Grzegorz Andrejczuk
  Cc: Dennis Dalessandro, Doug Ledford, Jason Gunthorpe, Ira Weiny,
	Vishwanathapura, Niranjana, Andrzej Kacprowski, linux-rdma,
	kernel-janitors

We should preserve the error code from hfi1_netdev_rx_init() but
currently the function returns success instead.

Fixes: 2280740f01ae ("IB/hfi1: Virtual Network Interface Controller (VNIC) HW support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/infiniband/hw/hfi1/vnic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/vnic_main.c b/drivers/infiniband/hw/hfi1/vnic_main.c
index b183c56b7b6a4..f89d0cb1c7204 100644
--- a/drivers/infiniband/hw/hfi1/vnic_main.c
+++ b/drivers/infiniband/hw/hfi1/vnic_main.c
@@ -512,7 +512,8 @@ static int hfi1_vnic_init(struct hfi1_vnic_vport_info *vinfo)
 			goto txreq_fail;
 	}
 
-	if (hfi1_netdev_rx_init(dd)) {
+	rc = hfi1_netdev_rx_init(dd);
+	if (rc) {
 		dd_dev_err(dd, "Unable to initialize netdev contexts\n");
 		goto alloc_fail;
 	}
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-01 18:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 10:03 [PATCH] IB/hfi1: Fix an error code in hfi1_vnic_init() Dan Carpenter
2020-05-29 13:34 ` Marciniszyn, Mike
2020-05-30 14:02   ` [PATCH v2] IB/hfi1: Fix hfi1_netdev_rx_init() error handling Dan Carpenter
2020-05-31 10:05     ` Leon Romanovsky
2020-05-31 17:36       ` Dan Carpenter
2020-06-01  4:24         ` Leon Romanovsky
2020-06-01 12:27           ` Jason Gunthorpe
2020-06-01 12:49             ` Wan, Kaike
2020-06-01 14:14     ` Jason Gunthorpe
2020-06-01 18:01       ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).