From: jino.cho Date: Thu, 18 May 2017 05:59:20 +0000 (+0900) Subject: Check validation of pwm handle in the peripheral_pwm_close() X-Git-Tag: accepted/tizen/unified/20170602.054034~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=628bec3eec313f4980b038e2541d3fc394559784;p=platform%2Fcore%2Fapi%2Fperipheral-io.git Check validation of pwm handle in the peripheral_pwm_close() Change-Id: I0b8ae08011188087819365a2dc5cd40bb6b14f39 Signed-off-by: jino.cho --- diff --git a/src/peripheral_pwm.c b/src/peripheral_pwm.c index 2b9c1a9..ecb9b4a 100644 --- a/src/peripheral_pwm.c +++ b/src/peripheral_pwm.c @@ -58,6 +58,8 @@ int peripheral_pwm_close(peripheral_pwm_h pwm) { int ret = PERIPHERAL_ERROR_NONE; + if (pwm == NULL) return PERIPHERAL_ERROR_INVALID_PARAMETER; + ret = peripheral_gdbus_pwm_close(pwm); pwm_proxy_deinit();