From: Konrad Kuchciak Date: Thu, 4 Oct 2018 09:54:36 +0000 (+0200) Subject: gpio: don't ignore return codes when setting/unsetting interrupted cb X-Git-Tag: submit/tizen/20190213.063316~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F190644%2F1;p=platform%2Fcore%2Fapi%2Fperipheral-io.git gpio: don't ignore return codes when setting/unsetting interrupted cb Change-Id: Iaf3be22ee5939b6ff8ed239a803eabddd57e21dc Signed-off-by: Konrad Kuchciak --- diff --git a/src/peripheral_gpio.c b/src/peripheral_gpio.c index eb2c999..addadc9 100644 --- a/src/peripheral_gpio.c +++ b/src/peripheral_gpio.c @@ -145,15 +145,11 @@ int peripheral_gpio_set_edge_mode(peripheral_gpio_h gpio, peripheral_gpio_edge_e */ int peripheral_gpio_set_interrupted_cb(peripheral_gpio_h gpio, peripheral_gpio_interrupted_cb callback, void *user_data) { - int ret = PERIPHERAL_ERROR_NONE; - RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported"); RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL"); RETVM_IF(callback == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio interrupted callback is NULL"); - peripheral_interface_gpio_set_interrupted_cb(gpio, callback, user_data); - - return ret; + return peripheral_interface_gpio_set_interrupted_cb(gpio, callback, user_data); } /** @@ -161,14 +157,10 @@ int peripheral_gpio_set_interrupted_cb(peripheral_gpio_h gpio, peripheral_gpio_i */ int peripheral_gpio_unset_interrupted_cb(peripheral_gpio_h gpio) { - int ret = PERIPHERAL_ERROR_NONE; - RETVM_IF(__is_feature_supported() == false, PERIPHERAL_ERROR_NOT_SUPPORTED, "GPIO feature is not supported"); RETVM_IF(gpio == NULL, PERIPHERAL_ERROR_INVALID_PARAMETER, "gpio handle is NULL"); - peripheral_interface_gpio_unset_interrupted_cb(gpio); - - return ret; + return peripheral_interface_gpio_unset_interrupted_cb(gpio); } /**