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@xxxxxxxxxx> --- 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