xtensa: ISS: add comment about etherdev freeing
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 3 Jul 2023 16:57:25 +0000 (09:57 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Tue, 11 Jul 2023 04:40:58 +0000 (21:40 -0700)
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

index 9ac46ab3a296cb599ab193b60ba0dae62c4c1cd7..7b97e6ab85a42124f4b1a399eef2b442293e8b92 100644 (file)
@@ -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();