Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37f4ee0b authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

rt2x00: fix cancelling uninitialized work



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

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Cc: stable@kernel.org
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2e3e66e3
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1062,8 +1062,10 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
	 * Stop all work.
	 * Stop all work.
	 */
	 */
	cancel_work_sync(&rt2x00dev->intf_work);
	cancel_work_sync(&rt2x00dev->intf_work);
	if (rt2x00_is_usb(rt2x00dev)) {
		cancel_work_sync(&rt2x00dev->rxdone_work);
		cancel_work_sync(&rt2x00dev->rxdone_work);
		cancel_work_sync(&rt2x00dev->txdone_work);
		cancel_work_sync(&rt2x00dev->txdone_work);
	}
	destroy_workqueue(rt2x00dev->workqueue);
	destroy_workqueue(rt2x00dev->workqueue);


	/*
	/*