[openwrt/openwrt] ralink: rt3833: fix compilation warning from device_reset in fe_probe
LEDE Commits
lede-commits at lists.infradead.org
Thu May 11 18:24:59 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/82afdf6056e747b0780511fb149e57d5247e6daf
commit 82afdf6056e747b0780511fb149e57d5247e6daf
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat May 6 23:24:46 2023 +0200
ralink: rt3833: fix compilation warning from device_reset in fe_probe
Fix compilation warning from device_reset in fe_probe. On fail print a
warning but don't fail probe.
Fix compilation warning:
drivers/net/ethernet/ralink/mtk_eth_soc.c: In function 'fe_probe':
drivers/net/ethernet/ralink/mtk_eth_soc.c:1564:9: error: ignoring return value of 'device_reset' declared with attribute 'warn_unused_result' [-Werror=unused-result]
1564 | device_reset(&pdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
index e07e5ed5a8..9876a247e3 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
@@ -1561,7 +1561,9 @@ static int fe_probe(struct platform_device *pdev)
struct clk *sysclk;
int err, napi_weight;
- device_reset(&pdev->dev);
+ err = device_reset(&pdev->dev);
+ if (err)
+ dev_err(&pdev->dev, "failed to reset device\n");
match = of_match_device(of_fe_match, &pdev->dev);
soc = (struct fe_soc_data *)match->data;
More information about the lede-commits
mailing list