projects
/
platform
/
core
/
api
/
peripheral-io.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68a6482
)
pio: return error when open is failed
95/165595/1
author
kibak.yoon
<kibak.yoon@samsung.com>
Tue, 2 Jan 2018 08:16:54 +0000
(17:16 +0900)
committer
kibak.yoon
<kibak.yoon@samsung.com>
Tue, 2 Jan 2018 08:16:54 +0000
(17:16 +0900)
- to prevent explicite null dereferenced, error should be returned when
open is failed.
Change-Id: I645dec3879d54d43edec1ba52ace84af6c86b180
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/peripheral_gpio.c
patch
|
blob
|
history
diff --git
a/src/peripheral_gpio.c
b/src/peripheral_gpio.c
index
b51c577
..
e5a3d8c
100644
(file)
--- a/
src/peripheral_gpio.c
+++ b/
src/peripheral_gpio.c
@@
-69,6
+69,7
@@
int peripheral_gpio_open(int gpio_pin, peripheral_gpio_h *gpio)
_E("Failed to open the gpio pin, ret : %d", ret);
free(handle);
handle = NULL;
+ return ret;
}
ret = peripheral_interface_gpio_set_initial_direction_into_handle(handle);