Message ID | 20200919023909.23716-1-zhengyongjun3@huawei.com |
---|---|
State | New |
Headers | show |
Series | [net-next] net: microchip: Remove set but not used variable | expand |
From: Zheng Yongjun <zhengyongjun3@huawei.com> Date: Sat, 19 Sep 2020 10:39:09 +0800 > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend: > drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] > > `ret` is set but not used, so check it's value. Subject is still wrong, please fix this and take your time doing so. Thanks.
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index de93cc6ebc1a..56a1b5928f9a 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -3053,7 +3053,7 @@ static int lan743x_pm_suspend(struct device *dev) /* Host sets PME_En, put D3hot */ ret = pci_prepare_to_sleep(pdev); - return 0; + return ret; } static int lan743x_pm_resume(struct device *dev)
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend: drivers/net/ethernet/microchip/lan743x_main.c:3041:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] `ret` is set but not used, so check it's value. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)