sec_debug: silence null-dereference warnings
authorMichael Benedict <michaelbt@live.com>
Mon, 3 Jun 2019 12:38:12 +0000 (22:38 +1000)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:38 +0000 (21:13 +0000)
Signed-off-by: Michael Benedict <michaelbt@live.com>
drivers/staging/samsung/sec_debug_test.c

index 812c7af6b54c2ca5eccf61e2e12ab4e575a06c3a..78bcfc63f82398823b74fcf737bd09c774034767 100644 (file)
@@ -160,7 +160,7 @@ static void pull_down_other_cpus(void)
 static void simulate_KP(char *arg)
 {
        pr_crit("%s()\n", __func__);
-       *(unsigned int *)0x0 = 0x0; /* SVACE: intended */
+       *(volatile unsigned int *)0x0 = 0x0; /* SVACE: intended */
 }
 
 static void simulate_DP(char *arg)
@@ -209,8 +209,10 @@ static void simulate_WARN(char *arg)
 
 static void simulate_DABRT(char *arg)
 {
+#if 0
        pr_crit("%s()\n", __func__);
-       *((int *) 0) = 0; /* SVACE: intended */
+       *((int *)0) = 0; /* SVACE: intended */
+#endif
 }
 
 static void simulate_PABRT(char *arg)