From patchwork Wed Nov 16 16:01:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Thanki X-Patchwork-Id: 9431983 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D8D060469 for ; Wed, 16 Nov 2016 16:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC9528D4E for ; Wed, 16 Nov 2016 16:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7134B28F51; Wed, 16 Nov 2016 16:01:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22BD128D4E for ; Wed, 16 Nov 2016 16:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753140AbcKPQB1 (ORCPT ); Wed, 16 Nov 2016 11:01:27 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34077 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbcKPQB0 (ORCPT ); Wed, 16 Nov 2016 11:01:26 -0500 Received: by mail-wm0-f65.google.com with SMTP id g23so12578544wme.1 for ; Wed, 16 Nov 2016 08:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=UKjgEj6eDZKqjnuszGL9plsVCsfUJQypKcrwmwDfsrw=; b=Taiy9g7N9/GZzPSXsXrFF+OfAd78kqImn2n5LMb5CDhyX7dnjra9PmDcO8bpcuW5ng lzCkPgVIqleMekkSf/bU+YS7k2vs/eWcRuPUQpjNyj6SPAxjovu5s2PtqKCP6L5ybQIE 6AIdlmdYzW4syBosnvBu6IS1UzFcOrnwYc9vogaoMSNFlU7YOaV369CiEQuSFYbOgImF CWrHrlvFeYhVKBtAGEigyu/Hp8WfGc0S//xaMhNndNSbEAyMCiPVatobACrZuephpFAj CjY3aZeZ1N4l/ZjiIXUsr0Q5i4qVN43ISXIRPamfuVcR+arejtanzCQo6cE5x23cboGk fjlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UKjgEj6eDZKqjnuszGL9plsVCsfUJQypKcrwmwDfsrw=; b=dhjqRnEhp92RKKcJfsJ1mMLXshElCS8DGViE8nK7JWd7gTGIIYDT8aNOBlJ/UjX/KE Bvq1G4T2zjxK75hPECbaFonpNfqL5F2qtLEx1nNHxlXWBAusDM0wvIgWAYvz3Dl9Oghh wDJvol1nh0Nxi+UsBRP19zUBM+IPfzlXIhwPtujoliMnfGU1eDqfGC+XLvKbvXi1hebe ibQrklkuWoiTFTG7e/EkY/9bthRcmPB06HZlMxp3eUTllTwgx5e76KSr0sE32oxXVpu1 nD+tHXq5iCluWdh0OmT+HRI2Fv8crVmc4pgnJzm3kP+2DShN0RsbehFrikjhiSI4IQrE oXTQ== X-Gm-Message-State: ABUngvcm8UxoiubthseUx8SdbmDqADMhacdD3yXHRLUC0Cuo3LvZfTc2kOkWtsYcafqPCA== X-Received: by 10.28.178.10 with SMTP id b10mr11772176wmf.83.1479312084872; Wed, 16 Nov 2016 08:01:24 -0800 (PST) Received: from c50.bag.software ([212.91.253.218]) by smtp.gmail.com with ESMTPSA id i132sm10836477wmf.14.2016.11.16.08.01.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 08:01:23 -0800 (PST) From: Vishal Thanki To: sgruszka@redhat.com, helmut.schaa@googlemail.com, linux-wireless@vger.kernel.org, kvalo@codeaurora.org Cc: Vishal Thanki Subject: [PATCH] rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB Date: Wed, 16 Nov 2016 17:01:54 +0100 Message-Id: <1479312114-9389-1-git-send-email-vishalthanki@gmail.com> X-Mailer: git-send-email 2.4.11 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index 17a0c1b..eb7b714 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c @@ -1441,7 +1441,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);