Skip to content

Commit 4e3c7c0

Browse files
YueHaibingdavem330
authored andcommitted
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: cce96d1 ("net: aquantia: Regression on reset with 1.x firmware") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ff22378 commit 4e3c7c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
263263
AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) &
264264
HW_ATL_MPI_STATE_MSK) == MPI_DEINIT,
265265
10, 1000U);
266+
if (err)
267+
return err;
266268
}
267269

268270
if (self->rbl_enabled)

0 commit comments

Comments
 (0)