linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization
@ 2016-12-03 13:10 Pan Bian
  2016-12-04  6:20 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Pan Bian @ 2016-12-03 13:10 UTC (permalink / raw)
  To: Selvin Xavier, Devesh Sharma, Mitesh Ahuja, Doug Ledford,
	Sean Hefty, Hal Rosenstock
  Cc: linux-rdma, linux-kernel, Pan Bian

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

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

* Re: [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization
  2016-12-03 13:10 [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization Pan Bian
@ 2016-12-04  6:20 ` Leon Romanovsky
  2016-12-14 19:34   ` Doug Ledford
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2016-12-04  6:20 UTC (permalink / raw)
  To: Pan Bian
  Cc: Selvin Xavier, Devesh Sharma, Mitesh Ahuja, Doug Ledford,
	Sean Hefty, Hal Rosenstock, linux-rdma, linux-kernel, Pan Bian

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

On Sat, Dec 03, 2016 at 09:10:21PM +0800, Pan Bian wrote:
> 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>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization
  2016-12-04  6:20 ` Leon Romanovsky
@ 2016-12-14 19:34   ` Doug Ledford
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2016-12-14 19:34 UTC (permalink / raw)
  To: Leon Romanovsky, Pan Bian
  Cc: Selvin Xavier, Devesh Sharma, Mitesh Ahuja, Sean Hefty,
	Hal Rosenstock, linux-rdma, linux-kernel, Pan Bian


[-- Attachment #1.1: Type: text/plain, Size: 669 bytes --]

On 12/4/2016 1:20 AM, Leon Romanovsky wrote:
> On Sat, Dec 03, 2016 at 09:10:21PM +0800, Pan Bian wrote:
>> 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>
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> 

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

end of thread, other threads:[~2016-12-14 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03 13:10 [PATCH 1/1] infiniband: hw: ocrdma: fix bad initialization Pan Bian
2016-12-04  6:20 ` Leon Romanovsky
2016-12-14 19:34   ` Doug Ledford

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).