Message ID | 20241001182916.122259-6-rosenp@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | clean up with devm | expand |
On Tue, Oct 01, 2024 at 11:29:12AM -0700, Rosen Penev wrote: > No need to call in _remove. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 843e3606c2ea..4e0a277a5ee3 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -2246,8 +2246,6 @@ static void smsc911x_drv_remove(struct platform_device *pdev) SMSC_TRACE(pdata, ifdown, "Stopping driver"); - unregister_netdev(dev); - pm_runtime_disable(&pdev->dev); } @@ -2390,7 +2388,7 @@ static int smsc911x_drv_probe(struct platform_device *pdev) goto out_init_fail; } - retval = register_netdev(dev); + retval = devm_register_netdev(&pdev->dev, dev); if (retval) { SMSC_WARN(pdata, probe, "Error %i registering device", retval); goto out_init_fail;
No need to call in _remove. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- drivers/net/ethernet/smsc/smsc911x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)