Message ID | 20210210075417.1096059-1-weiyongjun1@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net/mlx5: SF, Fix error return code in mlx5_sf_dev_probe() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: davem@davemloft.net |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Wed, Feb 10, 2021 at 07:54:17AM +0000, Wei Yongjun wrote: > Fix to return negative error code -ENOMEM from the ioremap() error > handling case instead of 0, as done elsewhere in this function. > > Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- > .../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 + > 1 file changed, 1 insertion(+) > Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
On Wed, 2021-02-10 at 10:03 +0200, Leon Romanovsky wrote: > On Wed, Feb 10, 2021 at 07:54:17AM +0000, Wei Yongjun wrote: > > Fix to return negative error code -ENOMEM from the ioremap() error > > handling case instead of 0, as done elsewhere in this function. > > > > Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") > > Reported-by: Hulk Robot <hulkci@huawei.com> > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > > --- > > .../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 + > > 1 file changed, 1 insertion(+) > > > > Thanks, > Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Applied to net-next-mlx5, Thanks!
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c index daf63a8115e0..c4bf555c25ea 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c @@ -37,6 +37,7 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia mdev->iseg = ioremap(mdev->iseg_base, sizeof(*mdev->iseg)); if (!mdev->iseg) { mlx5_core_warn(mdev, "remap error\n"); + err = -ENOMEM; goto remap_err; }
Fix to return negative error code -ENOMEM from the ioremap() error handling case instead of 0, as done elsewhere in this function. Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- .../net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 1 + 1 file changed, 1 insertion(+)