lkml.org 
[lkml]   [2019]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
Date
On Fri, 2019-09-13 at 00:59 +0800, zhong jiang wrote:
> mlx5_unload_one do not need local variable to store different value,
> Hence just remove it.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> index 9648c22..c39bb37 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> @@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev
> *dev, bool boot)
>
> static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)
> {
> - int err = 0;
> -
> if (cleanup) {
> mlx5_unregister_device(dev);
> mlx5_drain_health_wq(dev);
> @@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev
> *dev, bool cleanup)
> mlx5_function_teardown(dev, cleanup);
> out:
> mutex_unlock(&dev->intf_state_mutex);
> - return err;
> + return 0;
> }
>
> static int mlx5_mdev_init(struct mlx5_core_dev *dev, int
> profile_idx)

Acked-by: Saeed Mahameed <saeedm@mellanox.com>
\
 
 \ /
  Last update: 2019-09-13 12:07    [W:0.080 / U:6.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site