diff mbox

[net] intersil/hostap: Fix outdated comment about dev->destructor

Message ID 0824ed85fd45846da65fc919ae22df9d7ebf2f97.1501150507.git.sbrivio@redhat.com (mailing list archive)
State Accepted
Commit 9ff067ff4c4a08d412e51307f11f7de3fb3045e7
Delegated to: Kalle Valo
Headers show

Commit Message

Stefano Brivio July 27, 2017, 11:20 a.m. UTC
After commit cf124db566e6 ("net: Fix inconsistent teardown and
release of private netdev state."), setting
'dev->needs_free_netdev' ensures device data is released, and
'dev->destructor' is not used anymore.

Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
Despite checkpatch.pl warning against unnecessary changes, this
outdated comment might lead to confusion -- making this change
actually necessary, perhaps.

 drivers/net/wireless/intersil/hostap/hostap_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kalle Valo Aug. 3, 2017, 10:08 a.m. UTC | #1
Stefano Brivio <sbrivio@redhat.com> wrote:

> After commit cf124db566e6 ("net: Fix inconsistent teardown and
> release of private netdev state."), setting
> 'dev->needs_free_netdev' ensures device data is released, and
> 'dev->destructor' is not used anymore.
> 
> Fixes: cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state.")
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Patch applied to wireless-drivers-next.git, thanks.

9ff067ff4c4a hostap: Fix outdated comment about dev->destructor
diff mbox

Patch

diff --git a/drivers/net/wireless/intersil/hostap/hostap_main.c b/drivers/net/wireless/intersil/hostap/hostap_main.c
index a3c066f90afc..012930d35434 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_main.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_main.c
@@ -125,8 +125,8 @@  void hostap_remove_interface(struct net_device *dev, int rtnl_locked,
 	else
 		unregister_netdev(dev);
 
-	/* dev->destructor = free_netdev() will free the device data, including
-	 * private data, when removing the device */
+	/* 'dev->needs_free_netdev = true' implies device data, including
+	 * private data, will be freed when the device is removed */
 }