mwifiex: remove unnecessary wakeup interrupt number sanity check
authorXinming Hu <huxm@marvell.com>
Thu, 13 Apr 2017 06:48:19 +0000 (06:48 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 20 Apr 2017 07:18:07 +0000 (10:18 +0300)
If wakeup interrupt handler is called, we know that the wakeup
interrupt number is valid, there is no need to check it.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/main.c

index 912b687f467157148201af56e0a113d5508d5d2d..3d59d74c7f9975676cb3c01fe0f291b320b3a093 100644 (file)
@@ -1514,11 +1514,9 @@ static irqreturn_t mwifiex_irq_wakeup_handler(int irq, void *priv)
 {
        struct mwifiex_adapter *adapter = priv;
 
-       if (adapter->irq_wakeup >= 0) {
-               dev_dbg(adapter->dev, "%s: wake by wifi", __func__);
-               adapter->wake_by_wifi = true;
-               disable_irq_nosync(irq);
-       }
+       dev_dbg(adapter->dev, "%s: wake by wifi", __func__);
+       adapter->wake_by_wifi = true;
+       disable_irq_nosync(irq);
 
        /* Notify PM core we are wakeup source */
        pm_wakeup_event(adapter->dev, 0);