summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorVishal Thanki <vishalthanki@gmail.com>2016-11-16 16:01:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 05:11:47 (GMT)
commit31c576a5fe506b173559cf956dfd7f792cbfd601 (patch)
tree6fd1d413483af9722856c0b3b81a2c5381299857 /drivers/net/wireless
parentf0df317b2bb383301bab159b96f1559f81ca51ef (diff)
downloadlinux-31c576a5fe506b173559cf956dfd7f792cbfd601.tar.xz
rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB
commit a083c8fd277b4122c804f18ec8c84165f345c71c upstream. In device removal routine, usage of "#ifdef CONFIG_RT2X00_LIB_USB" will not cover the case when it is configured as module. This will omit the entire if-block which does cleanup of URBs and cancellation of pending work. Changing the #ifdef to #if IS_ENABLED() to fix it. Signed-off-by: Vishal Thanki <vishalthanki@gmail.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2x00dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index 4e0c565..b7273be 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1422,7 +1422,7 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
cancel_work_sync(&rt2x00dev->intf_work);
cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
cancel_work_sync(&rt2x00dev->sleep_work);
-#ifdef CONFIG_RT2X00_LIB_USB
+#if IS_ENABLED(CONFIG_RT2X00_LIB_USB)
if (rt2x00_is_usb(rt2x00dev)) {
usb_kill_anchored_urbs(rt2x00dev->anchor);
hrtimer_cancel(&rt2x00dev->txstatus_timer);