[ 087/108] r8169: call netif_napi_del at errpaths and at driver unload

From: Ben Hutchings
Date: Sun Jul 22 2012 - 22:03:21 EST

3.2-stable review patch. If anyone has any objections, please let me know.


From: Devendra Naga <devendra.aaru@xxxxxxxxx>

commit ad1be8d345416a794dea39761a374032aa471a76 upstream.

when register_netdev fails, the init'ed NAPIs by netif_napi_add must be
deleted with netif_napi_del, and also when driver unloads, it should
delete the NAPI before unregistering netdevice using unregister_netdev.

Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
drivers/net/ethernet/realtek/r8169.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -4185,6 +4185,7 @@ out:
return rc;

+ netif_napi_del(&tp->napi);
rtl_disable_msi(pdev, tp);
@@ -4210,6 +4211,8 @@ static void __devexit rtl8169_remove_one


+ netif_napi_del(&tp->napi);


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/