retval = datacontrol_check_cert(provider->provider_id, true, NULL);
if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) {
retval = datacontrol_check_cert(provider->provider_id, false, NULL);
- if (retval != DATA_CONTROL_ERROR_NONE)
- return retval;
- } else if (retval != DATA_CONTROL_ERROR_NONE) {
- return retval;
+ if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED)
+ return DATA_CONTROL_ERROR_PERMISSION_DENIED;
}
return datacontrol_add_data_change_cb(
retval = datacontrol_check_cert(provider->provider_id, true, NULL);
if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED) {
retval = datacontrol_check_cert(provider->provider_id, false, NULL);
- if (retval != DATA_CONTROL_ERROR_NONE)
- return retval;
- } else if (retval != DATA_CONTROL_ERROR_NONE) {
- return retval;
+ if (retval == DATA_CONTROL_ERROR_PERMISSION_DENIED)
+ return DATA_CONTROL_ERROR_PERMISSION_DENIED;
}
return datacontrol_remove_data_change_cb((datacontrol_h)provider, callback_id);