if (self->sequence == -1) {
/* Get the default sensor */
ret = sensor_get_default_sensor (self->type, &self->sensor);
- if (ret)
+ if (ret != SENSOR_ERROR_NONE)
return ret;
} else {
sensor_h *list;
/* Use the sequence number to choose one */
ret = sensor_get_sensor_list (self->type, &list, &count);
- if (ret)
+ if (ret != SENSOR_ERROR_NONE)
return ret;
if (count <= self->sequence) {
}
ret = sensor_create_listener (self->sensor, &self->listener);
- if (ret)
+ if (ret != SENSOR_ERROR_NONE)
return ret;
/* 3. Configure interval_ms */
case TZN_SENSOR_MODE_ACTIVE_POLLING:
ret = sensor_listener_set_event_cb (listener, self->interval_ms,
_ts_tizen_sensor_callback, self);
- if (ret)
+ if (ret != SENSOR_ERROR_NONE)
return ret;
break;
#endif