summaryrefslogtreecommitdiffstats
path: root/power
diff options
context:
space:
mode:
Diffstat (limited to 'power')
-rw-r--r--power/power.c5
1 files changed, 4 insertions, 1 deletions
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 @@ static void samsung_power_set_interactive(struct power_module *module, int on)
}
}
- 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) {