misc: tegra-baseband: reset irq value if failed to request
Prashant Gaikwad [Thu, 5 Sep 2013 09:46:21 +0000 (14:46 +0530)]
Change-Id: Ib9b54607fc5aae60ac0c3abdc0c8cfe106553971
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/270749
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Tested-by: Shridhar Rasal <srasal@nvidia.com>

drivers/misc/tegra-baseband/tegra_usb_modem_power.c

index 2b3fdd5..a59642b 100644 (file)
@@ -434,8 +434,10 @@ static int mdm_request_irq(struct tegra_usb_modem *modem,
        /* request threaded irq for GPIO */
        ret = request_threaded_irq(*irq, NULL, thread_fn, irq_flags, label,
                                   modem);
-       if (ret)
+       if (ret) {
+               *irq = 0;
                return ret;
+       }
 
        ret = enable_irq_wake(*irq);
        *is_wakeable = (ret) ? false : true;