Add return code to avoid reaching uninitialized enum variable "state".
Change-Id: Idce5e24bc2c979c350629b8e413494dd62003cf5
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
(cherry picked from commit
5d024fdb8bd0ab5d493ddaeeccd0fff5bc9472f8)
if (!touchscreen_dev_available || (ret == -ENODEV))
return 0;
- if (ret < 0)
+ if (ret < 0) {
_E("Failed to get touchscreen state: %d", ret);
+ return ret;
+ }
if (state == TOUCHSCREEN_ON)
LOG_DUMP(fp, "Touchscreen is enabled\n");