[PATCHv2 net-next 10/10] net: lantiq_etop: return by register_netdev
From: Rosen Penev
Date: Tue Oct 01 2024 - 14:49:14 EST
Simpler to do so. The error is not handled anyways.
Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
drivers/net/ethernet/lantiq_etop.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 355b96ecc5ec..cc5b94bc30b9 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -661,12 +661,8 @@ ltq_etop_probe(struct platform_device *pdev)
priv->ch[i].netdev = dev;
}
- err = devm_register_netdev(&pdev->dev, dev);
- if (err)
- return err;
-
platform_set_drvdata(pdev, dev);
- return 0;
+ return devm_register_netdev(&pdev->dev, dev);
}
static void ltq_etop_remove(struct platform_device *pdev)
--
2.46.2