If there is no vibration backend(device), hal-api-device returns -ENODEV through feedbackd.
However, that value goes to dbus getter variable not the return value of dbus call.
Thus, the return check code has been modified as intended.
Change-Id: If47d60bce6eadb0c9a09e2cbfc84d22f0a727ab6
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
METHOD_GET_COUNT, NULL, &val);
/**
* there is no haptic method in no vibration model.
- * so -ENOTSUP means that haptic count is zero.
+ * so -ENODEV means that haptic count is zero.
*/
- if (ret_val == -ENOTSUP)
- ret_val = 0;
+ if (val == -ENODEV)
+ val = 0;
else if (ret_val < 0)
return errno_to_device_error(ret_val); //LCOV_EXCL_LINE System Error