power: Sanity check touchscreen path

* Let's not always assume this isn't NULL

Change-Id: I181cb014fc06d0f0ca795c3ecc374ccf9dbb57f1
Signed-off-by: Paul Keith <javelinanddart@bestas.gr>
diff --git a/power/power.c b/power/power.c
index e46a53e..54edcf2 100644
--- a/power/power.c
+++ b/power/power.c
@@ -382,7 +382,10 @@
         }
     }
 
-    sysfs_write(samsung_pwr->touchscreen_power_path, on ? "1" : "0");
+    /* Sanity check the touchscreen path */
+    if (samsung_pwr->touchscreen_power_path) {
+        sysfs_write(samsung_pwr->touchscreen_power_path, on ? "1" : "0");
+    }
 
     /* Bail out if the device does not have touchkeys */
     if (samsung_pwr->touchkey_power_path == NULL) {