mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
cf76aa1aab
commit
3af1c181ee
@ -3469,6 +3469,7 @@ slave_start:
|
||||
|
||||
if (!SRIOV_VALID_STATE(dev->flags)) {
|
||||
mlx4_err(dev, "Invalid SRIOV state\n");
|
||||
err = -EINVAL;
|
||||
goto err_close;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user