The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Wang ShaoBo <bobo.shaobowang@huawei.com>
To: <jgg@ziepe.ca>
Cc: <dennis.dalessandro@cornelisnetworks.com>,
	<mike.marciniszyn@cornelisnetworks.com>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<huawei.libin@huawei.com>, <cj.chengjian@huawei.com>
Subject: [PATCH] IB/hfi1: Fix error return code in hfi1_init_dd()
Date: Sun, 15 Nov 2020 16:25:48 +0800	[thread overview]
Message-ID: <20201115082548.35793-1-bobo.shaobowang@huawei.com> (raw)

Fix to return the error code from hfi1_netdev_alloc() instaed of 0
in hfi1_init_dd(), as done elsewhere in this function.

Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
 drivers/infiniband/hw/hfi1/chip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 7eaf99538216..c87b94ea2939 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
 		    & CCE_REVISION_SW_MASK);
 
 	/* alloc netdev data */
-	if (hfi1_netdev_alloc(dd))
+	ret = hfi1_netdev_alloc(dd);
+	if (ret)
 		goto bail_cleanup;
 
 	ret = set_up_context_variables(dd);
-- 
2.25.1


             reply	other threads:[~2020-11-15  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15  8:25 Wang ShaoBo [this message]
2020-11-15  9:29 ` [PATCH] IB/hfi1: Fix error return code in hfi1_init_dd() Leon Romanovsky
  -- strict thread matches above, loose matches on Subject: below --
2020-11-13  6:42 [PATCH] IB/hfi1: fix " Zhang Changzhong
2020-11-13 16:12 ` Mike Marciniszyn
2020-11-13 16:36 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201115082548.35793-1-bobo.shaobowang@huawei.com \
    --to=bobo.shaobowang@huawei.com \
    --cc=cj.chengjian@huawei.com \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=huawei.libin@huawei.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox