[net-next,3/3] ezchip: Further clean-up

Message ID e65e188a837c59c1f1785b491c775a6ee1aed5d4.1672865629.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series ezchip: Simplify some code |

Commit Message

Christophe JAILLET Jan. 4, 2023, 9:05 p.m. UTC
  Now that is only call to platform_get_drvdata() is removed, calling
platform_set_drvdata() looks useless. Remove it.

While at it, remove a useless 'err' initialization and change its type to a
more common 'int'

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/ezchip/nps_enet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index 21e230150104..139510d9669f 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -574,7 +574,7 @@  static s32 nps_enet_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct net_device *ndev;
 	struct nps_enet_priv *priv;
-	s32 err = 0;
+	int err;
 
 	if (!dev->of_node)
 		return -ENODEV;
@@ -583,7 +583,6 @@  static s32 nps_enet_probe(struct platform_device *pdev)
 	if (!ndev)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, ndev);
 	SET_NETDEV_DEV(ndev, dev);
 	priv = netdev_priv(ndev);