msm: subsystem_restart: Panic on SSR errors

Don't just warn when SSR operations such as powerup
or shutdown fail. Panic the device so that failure-point
analysis is possible.

Change-Id: I09a5ca37d8a7cfaa8fd7ed7025711c6467c20e84
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
diff --git a/arch/arm/mach-msm/subsystem_restart.c b/arch/arm/mach-msm/subsystem_restart.c
index 5b7438e..14c666b 100644
--- a/arch/arm/mach-msm/subsystem_restart.c
+++ b/arch/arm/mach-msm/subsystem_restart.c
@@ -243,7 +243,7 @@
 	if (time_first && n >= max_restarts_check) {
 		if ((curr_time->tv_sec - time_first->tv_sec) <
 				max_history_time_check) {
-			WARN(1, "Subsystems have crashed %d times in less than "\
+			panic("Subsystems have crashed %d times in less than "\
 				"%ld seconds!", max_restarts_check,
 				max_history_time_check);
 		}
@@ -283,7 +283,7 @@
 
 	pr_info("[%p]: Shutting down %s\n", current, name);
 	if (dev->desc->shutdown(dev->desc) < 0) {
-		WARN(1, "subsys-restart: [%p]: Failed to shutdown %s!",
+		panic("subsys-restart: [%p]: Failed to shutdown %s!",
 			current, name);
 	}
 }
@@ -303,7 +303,7 @@
 
 	pr_info("[%p]: Powering up %s\n", current, name);
 	if (dev->desc->powerup(dev->desc) < 0) {
-		WARN(1, "[%p]: Failed to powerup %s!", current, name);
+		panic("[%p]: Failed to powerup %s!", current, name);
 	}
 }
 
@@ -357,7 +357,7 @@
 	 * out, since a subsystem died in its powerup sequence.
 	 */
 	if (!mutex_trylock(powerup_lock)) {
-		WARN(1, "%s[%p]: Subsystem died during powerup!",
+		panic("%s[%p]: Subsystem died during powerup!",
 						__func__, current);
 	}
 
@@ -570,11 +570,8 @@
 	restart_level = RESET_SOC;
 
 	ssr_wq = alloc_workqueue("ssr_wq", WQ_CPU_INTENSIVE, 0);
-
-	if (!ssr_wq) {
-		pr_err("%s: out of memory\n", __func__);
-		return -ENOMEM;
-	}
+	if (!ssr_wq)
+		panic("%s: out of memory\n", __func__);
 
 	return ssr_init_soc_restart_orders();
 }