summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpr.jung <pr.jung@samsung.com>2017-06-12 17:30:00 +0900
committerpr.jung <pr.jung@samsung.com>2017-06-12 18:21:50 +0900
commit67563c1cb19c622458d23f7b4c3a98ca5f3dfa23 (patch)
tree5244b72c8b5b66aeed65cf7c91713c97a6f04fed /src
parent06a57bd7c47c3c2cfe8abb0751b3872496d27654 (diff)
downloadlibsvi-67563c1cb19c622458d23f7b4c3a98ca5f3dfa23.tar.gz
libsvi-67563c1cb19c622458d23f7b4c3a98ca5f3dfa23.tar.bz2
libsvi-67563c1cb19c622458d23f7b4c3a98ca5f3dfa23.zip
Should return access denied error for EACCESsubmit/tizen/20170612.104922accepted/tizen/unified/20170612.171505
Change-Id: Idd04a66e40015ea23f16472f3475bbd8f9042cc9 Signed-off-by: pr.jung <pr.jung@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/feedback.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/feedback.c b/src/feedback.c
index 52b9b7f..1b436a3 100644
--- a/src/feedback.c
+++ b/src/feedback.c
@@ -39,6 +39,10 @@ static int restart_callback()
const struct device_ops *dev;
dev = find_device(FEEDBACK_TYPE_VIBRATION);
+ if (!dev) {
+ _E("Not supported device : type(FEEDBACK_TYPE_VIBRATION)"); //LCOV_EXCL_LINE
+ return -1;
+ }
if (dev->init)
dev->init();
return 0;
@@ -224,7 +228,7 @@ API int feedback_stop(void)
err = devices_stop();
if (err == -ENOTSUP)
return FEEDBACK_ERROR_NOT_SUPPORTED;
- else if (err == -ECOMM)
+ else if (err == -ECOMM || err == -EACCES)
return FEEDBACK_ERROR_PERMISSION_DENIED;
else if (err < 0)
return FEEDBACK_ERROR_OPERATION_FAILED;