All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Changzhong <zhangchangzhong@huawei.com>
To: <mike.marciniszyn@cornelisnetworks.com>,
	<dennis.dalessandro@cornelisnetworks.com>, <dledford@redhat.com>,
	<jgg@ziepe.ca>, <sadanand.warrier@intel.com>,
	<grzegorz.andrejczuk@intel.com>
Cc: <linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] IB/hfi1: fix error return code in hfi1_init_dd()
Date: Fri, 13 Nov 2020 14:42:27 +0800	[thread overview]
Message-ID: <1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com> (raw)

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@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 7eaf9953..c87b94e 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.9.5


             reply	other threads:[~2020-11-13  6:41 UTC|newest]

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

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=1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com \
    --to=zhangchangzhong@huawei.com \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dledford@redhat.com \
    --cc=grzegorz.andrejczuk@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@cornelisnetworks.com \
    --cc=sadanand.warrier@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.