projects
/
platform
/
core
/
system
/
deviced.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ea085b
)
touchscreen: clean-up uninitialized variable warning by static analysis
author
Yunhee Seo
<yuni.seo@samsung.com>
Thu, 19 Jan 2023 06:24:23 +0000
(15:24 +0900)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Wed, 25 Jan 2023 11:44:18 +0000
(20:44 +0900)
Add return code to avoid reaching uninitialized enum variable "state".
Change-Id: Idce5e24bc2c979c350629b8e413494dd62003cf5
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/touchscreen/touchscreen.c
patch
|
blob
|
history
diff --git
a/src/touchscreen/touchscreen.c
b/src/touchscreen/touchscreen.c
index
183a407
..
d7d0c18
100644
(file)
--- a/
src/touchscreen/touchscreen.c
+++ b/
src/touchscreen/touchscreen.c
@@
-242,8
+242,10
@@
static int touchscreen_dump(FILE *fp, int mode, void *dump_data)
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");