diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-24 11:16:41 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-28 00:23:37 +0100 |
commit | 4e3c7c00bba0636b97eb23d582c20b0f5d95ce20 (patch) | |
tree | 12a3901cb955aee92638cc589c503bf92e51b84f | |
parent | Merge branch 'bridge-bools' (diff) | |
download | linux-4e3c7c00bba0636b97eb23d582c20b0f5d95ce20.tar.xz linux-4e3c7c00bba0636b97eb23d582c20b0f5d95ce20.zip |
net: aquantia: return 'err' if set MPI_DEINIT state fails
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:260:7:
warning: variable 'err' set but not used [-Wunused-but-set-variable]
'err' should be returned while set MPI_DEINIT state fails
in hw_atl_utils_soft_reset.
Fixes: cce96d1883da ("net: aquantia: Regression on reset with 1.x firmware")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c index 1af6606a9166..9b74a3197d7f 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c @@ -263,6 +263,8 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self) AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) & HW_ATL_MPI_STATE_MSK) == MPI_DEINIT, 10, 1000U); + if (err) + return err; } if (self->rbl_enabled) |