Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next] net: microchip: Make `lan743x_pm_suspend` function return right value
@ 2020-09-21 12:08 Zheng Yongjun
2020-09-22 23:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-09-21 12:08 UTC (permalink / raw)
To: bryan.whitehead, UNGLinuxDriver, davem, kuba, netdev, linux-kernel
Cc: Zheng Yongjun
drivers/net/ethernet/microchip/lan743x_main.c: In function lan743x_pm_suspend:
`ret` is set but not used. In fact, `ret` should be the right value of `lan743x_pm_suspend`
function, therefore, fix it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: microchip: Make `lan743x_pm_suspend` function return right value
2020-09-21 12:08 [PATCH net-next] net: microchip: Make `lan743x_pm_suspend` function return right value Zheng Yongjun
@ 2020-09-22 23:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-22 23:54 UTC (permalink / raw)
To: zhengyongjun3; +Cc: bryan.whitehead, UNGLinuxDriver, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Mon, 21 Sep 2020 20:08:18 +0800
> @@ -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;
> }
Instead please do:
return pci_preprare_to_sleep(pdev);
And if 'ret' is then completely unused as a result, remove it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-22 23:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 12:08 [PATCH net-next] net: microchip: Make `lan743x_pm_suspend` function return right value Zheng Yongjun
2020-09-22 23:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).