]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
r8152: remove calling netif_napi_del
authorHayes Wang <hayeswang@realtek.com>
Wed, 28 Aug 2019 01:51:42 +0000 (09:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:35:07 +0000 (10:35 +0100)
[ Upstream commit 973dc6cfc0e2c43ff29ca5645ceaf1ae694ea110 ]

Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/r8152.c

index a2f63d10bcfe7a629ced4cfdfb078e4ba082a4a0..1a7b7bd412f9d2aaeb9a467135bbadbed987f2f3 100644 (file)
@@ -5309,7 +5309,6 @@ static int rtl8152_probe(struct usb_interface *intf,
        return 0;
 
 out1:
-       netif_napi_del(&tp->napi);
        usb_set_intfdata(intf, NULL);
 out:
        free_netdev(netdev);
@@ -5327,7 +5326,6 @@ static void rtl8152_disconnect(struct usb_interface *intf)
                if (udev->state == USB_STATE_NOTATTACHED)
                        set_bit(RTL8152_UNPLUG, &tp->flags);
 
-               netif_napi_del(&tp->napi);
                unregister_netdev(tp->netdev);
                cancel_delayed_work_sync(&tp->hw_phy_work);
                tp->rtl_ops.unload(tp);