From: Pan Bian <bianpan201602@163.com>
To: Selvin Xavier <selvin.xavier@avagotech.com>,
Devesh Sharma <devesh.sharma@avagotech.com>,
Mitesh Ahuja <mitesh.ahuja@avagotech.com>,
Doug Ledford <dledford@redhat.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Pan Bian <bianpan2016@163.com>
Subject: [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization
Date: Sat, 3 Dec 2016 21:10:21 +0800 [thread overview]
Message-ID: <1480770621-6249-1-git-send-email-bianpan201602@163.com> (raw)
From: Pan Bian <bianpan2016@163.com>
In function ocrdma_mbx_create_ah_tbl(), returns the value of status on
errors. However, because status is initialized with 0, 0 will be
returned even if on error paths. This patch initialize status with
"-ENOMEM".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188831
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index 67fc0b6..6876a71 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -1642,7 +1642,7 @@ static int ocrdma_build_q_conf(u32 *num_entries, int entry_size,
static int ocrdma_mbx_create_ah_tbl(struct ocrdma_dev *dev)
{
int i;
- int status = 0;
+ int status = -ENOMEM;
int max_ah;
struct ocrdma_create_ah_tbl *cmd;
struct ocrdma_create_ah_tbl_rsp *rsp;
--
1.9.1
next reply other threads:[~2016-12-03 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-03 13:10 Pan Bian [this message]
[not found] ` <1480770621-6249-1-git-send-email-bianpan201602-9Onoh4P/yGk@public.gmane.org>
2016-12-04 6:20 ` [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization Leon Romanovsky
[not found] ` <20161204062037.GH4497-2ukJVAZIZ/Y@public.gmane.org>
2016-12-14 19:34 ` Doug Ledford
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=1480770621-6249-1-git-send-email-bianpan201602@163.com \
--to=bianpan201602@163.com \
--cc=bianpan2016@163.com \
--cc=devesh.sharma@avagotech.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mitesh.ahuja@avagotech.com \
--cc=sean.hefty@intel.com \
--cc=selvin.xavier@avagotech.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;
as well as URLs for NNTP newsgroup(s).