diff options
| author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-07-23 18:36:09 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-04 12:27:39 +0200 |
| commit | ede4c93860e6bebcf0f6356bd3a24ac037e71ce9 (patch) | |
| tree | 773cb690a0dc7793e41c9ce98c42417e5dd35982 | |
| parent | acb97d4b2d0e7a4e0abf84b04ebd53aac6e8d407 (diff) | |
| download | linux-ede4c93860e6bebcf0f6356bd3a24ac037e71ce9.tar.gz linux-ede4c93860e6bebcf0f6356bd3a24ac037e71ce9.tar.bz2 linux-ede4c93860e6bebcf0f6356bd3a24ac037e71ce9.zip | |
mlx4: Fix missing error code in mlx4_load_one()
[ Upstream commit 7e4960b3d66d7248b23de3251118147812b42da2 ]
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'err'.
Eliminate the follow smatch warning:
drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn:
missing error code 'err'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of EQs and MSI-X vectors for PF/VFs")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index cb4664a040ab..35882d6ded8b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3526,6 +3526,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } |
