mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
IB/mlx5: Fix error code in get_port_caps()
The current code returns success when kmalloc() fails. It should
return an error code, -ENOMEM.
Fixes: e126ba97db
("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>
This commit is contained in:
parent
bfa76d4957
commit
f614fc15ae
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user