msm: subsystem_restart: Check return of kmalloc in do_epoch_check()

Avoid use of the NULL pointer by returning early if kmalloc fails.

Change-Id: I58e1d9b76727fd099437c86c2c7864695e285649
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/subsystem_restart.c b/arch/arm/mach-msm/subsystem_restart.c
index ff699e2..54607d0 100644
--- a/arch/arm/mach-msm/subsystem_restart.c
+++ b/arch/arm/mach-msm/subsystem_restart.c
@@ -252,6 +252,8 @@
 		goto out;
 
 	r_log = kmalloc(sizeof(struct restart_log), GFP_KERNEL);
+	if (!r_log)
+		goto out;
 	r_log->subsys = subsys;
 	do_gettimeofday(&r_log->time);
 	curr_time = &r_log->time;