* [PATCH] xtensa: ISS: add comment about etherdev freeing
@ 2023-07-03 17:03 Max Filippov
0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2023-07-03 17:03 UTC (permalink / raw)
To: linux-kernel; +Cc: Chris Zankel, Minjie Du, Max Filippov
iss_net_configure explicitly frees etherdev in all error return paths
except one where register_netdevice fails. In that remaining error
return path the etherdev is freed by the iss_net_pdev_release callback
triggered by the platform_device_unregister call. Add a comment stating
that.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
arch/xtensa/platforms/iss/network.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index 9ac46ab3a296..7b97e6ab85a4 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -540,6 +540,7 @@ static void iss_net_configure(int index, char *init)
rtnl_unlock();
pr_err("%s: error registering net device!\n", dev->name);
platform_device_unregister(&lp->pdev);
+ /* dev is freed by the iss_net_pdev_release callback */
return;
}
rtnl_unlock();
--
2.30.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-03 17:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03 17:03 [PATCH] xtensa: ISS: add comment about etherdev freeing Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox