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>
tirimbino
Paul Keith 8 years ago
parent 1961bdbc43
commit 5e4fbe091d
  1. 5
      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) {

Loading…
Cancel
Save