[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e65e188a837c59c1f1785b491c775a6ee1aed5d4.1672865629.git.christophe.jaillet@wanadoo.fr>
Date: Wed, 4 Jan 2023 22:05:34 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
netdev@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH net-next 3/3] ezchip: Further clean-up
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@...adoo.fr>
---
drivers/net/ethernet/ezchip/nps_enet.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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);
--
2.34.1
Powered by blists - more mailing lists