ARM: tegra: baseband: fix crash when queueing EDP work
Neil Patel [Fri, 25 Jan 2013 22:36:44 +0000 (17:36 -0500)]
Add a check for EDP initialization in the driver before queueing EDP
work on the modem workqueue. Otherwise a BUG() will occur in cases
where the EDP client is not enabled.

Bug 1224860

Change-Id: Ibacb19abfe955244da4a833f39bd0adf13e4f04c
Signed-off-by: Neil Patel <neilp@nvidia.com>
Reviewed-on: http://git-master/r/194268
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Steve Lin <stlin@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>

arch/arm/mach-tegra/tegra_usb_modem_power.c

index b60b0ce..6da9a67 100644 (file)
@@ -236,7 +236,7 @@ static irqreturn_t tegra_usb_modem_boot_thread(int irq, void *data)
        if (!work_pending(&modem->cpu_boost_work))
                queue_work(modem->wq, &modem->cpu_boost_work);
 
-       if (!v)
+       if (modem->edp_initialized && !v)
                queue_work(modem->wq, &modem->edp_work);
 
        /* USB disconnect maybe on going... */