Skip to contentSkip to conversation

xtensa: ISS: add comment about etherdev freeing

PATCH New Max Filippov 1 participant 1 message Jul 3, 2023 Tensilica Xtensa port (xtensa)

lore
Share & tools
lore

Max Filippov

author maintainer
#0 lore raw

PATCH 1/1 xtensa: ISS: add comment about etherdev freeing

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.

---
 arch/xtensa/platforms/iss/network.c | 1 +
 1 file changed, 1 insertion(+)
arch/xtensa/platforms/iss/network.c +1 -0
index 9ac46ab3a296..7b97e6ab85a4 100644
@@ -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();
Signature · 1 line
2.30.2