projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa76d4
)
IB/mlx5: Fix error code in get_port_caps()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Mon, 12 Jan 2015 08:56:58 +0000
(11:56 +0300)
committer
Roland Dreier
<roland@purestorage.com>
Tue, 17 Feb 2015 18:22:59 +0000
(10:22 -0800)
The current code returns success when kmalloc() fails. It should
return an error code, -ENOMEM.
Fixes:
e126ba97dba9
("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx5/main.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/mlx5/main.c
b/drivers/infiniband/hw/mlx5/main.c
index
03bf812
..
b1eda4a
100644
(file)
--- a/
drivers/infiniband/hw/mlx5/main.c
+++ b/
drivers/infiniband/hw/mlx5/main.c
@@
-997,7
+997,7
@@
static int get_port_caps(struct mlx5_ib_dev *dev)
struct ib_device_attr *dprops = NULL;
struct ib_port_attr *pprops = NULL;
struct mlx5_general_caps *gen;
- int err =
0
;
+ int err =
-ENOMEM
;
int port;
gen = &dev->mdev->caps.gen;