rt2x00: fix cancelling uninitialized work

{rx,tx}done_work's are only initialized for usb devices.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by Stanislaw Gruszka and committed by John W. Linville 37f4ee0b 2e3e66e3

+4 -2
+4 -2
drivers/net/wireless/rt2x00/rt2x00dev.c
··· 1062 * Stop all work. 1063 */ 1064 cancel_work_sync(&rt2x00dev->intf_work); 1065 - cancel_work_sync(&rt2x00dev->rxdone_work); 1066 - cancel_work_sync(&rt2x00dev->txdone_work); 1067 destroy_workqueue(rt2x00dev->workqueue); 1068 1069 /*
··· 1062 * Stop all work. 1063 */ 1064 cancel_work_sync(&rt2x00dev->intf_work); 1065 + if (rt2x00_is_usb(rt2x00dev)) { 1066 + cancel_work_sync(&rt2x00dev->rxdone_work); 1067 + cancel_work_sync(&rt2x00dev->txdone_work); 1068 + } 1069 destroy_workqueue(rt2x00dev->workqueue); 1070 1071 /*