BACKPORT: r8169: fix lockdep warning when removing interface

The work queue is initialised in rtl_open (when the interface goes up),
but canceled in rtl_remove_one (when the PCI device gets removed). If
the network interface is not brought up, then the work queue struct is
not initialised. When the device is removed, the attempt to cancel the
uninitialised work queue causes a lockdep warning.

This patch fixes the issue by moving cancel_work_sync to rtl_close (to
match rtl_open). (Note that rtl_close is also called via
unregister_netdev in rtl_remove_one.)

BUG=chromium:451134
TEST=network_ShillInitScripts no longer causes mccloud to panic

Conflicts:
	drivers/net/ethernet/realtek/r8169.c
	 - removed call to netif_napi_del not used in 3.4 r8169 driver

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4ea72445bddd2ca09fc719065fc3c5a8bfc8ca10)
Signed-off-by: Stephen Barber <smbarber@chromium.org>

Change-Id: Ia1088a00e490785621d076a58430c2074290d9b8
Reviewed-on: https://chromium-review.googlesource.com/251350
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
1 file changed