diff options
author | Paul Keith <javelinanddart@bestas.gr> | 2017-04-21 21:34:17 -0500 |
---|---|---|
committer | Paul Keith <javelinanddart@bestas.gr> | 2017-04-24 14:14:53 -0500 |
commit | 5e4fbe091dac9a8f07567f511f5ef50bef28addc (patch) | |
tree | fe528f843d428cb5738cd9bf4dc6fc3d62531193 | |
parent | 1961bdbc43baba05ba4ebde37f6e772258fbdbbc (diff) | |
download | android_hardware_samsung-5e4fbe091dac9a8f07567f511f5ef50bef28addc.tar.gz android_hardware_samsung-5e4fbe091dac9a8f07567f511f5ef50bef28addc.tar.bz2 android_hardware_samsung-5e4fbe091dac9a8f07567f511f5ef50bef28addc.zip |
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>
-rw-r--r-- | power/power.c | 5 |
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) { |