common/omv_csi: Allow IOCTLs to return positive values.

This commit is contained in:
Kwabena W. Agyeman 2025-07-02 21:12:13 -07:00
parent 8d03d2bc5e
commit ea0505d52e
3 changed files with 3 additions and 3 deletions

View File

@ -1353,7 +1353,7 @@ __weak int omv_csi_ioctl(omv_csi_t *csi, int request, ... /* arg */) {
int ret = csi->ioctl(csi, request, ap);
va_end(ap);
return ((ret != 0) ? OMV_CSI_ERROR_CTL_FAILED : 0);
return ((ret < 0) ? OMV_CSI_ERROR_CTL_FAILED : ret);
}
__weak int omv_csi_set_vsync_callback(omv_csi_t *csi, omv_csi_cb_t cb) {

View File

@ -1116,7 +1116,7 @@ static mp_obj_t py_omv_csi_ioctl(size_t n_args, const mp_obj_t *args) {
}
}
if (error != 0) {
if (error < 0) {
omv_csi_raise_error(error);
}

View File

@ -1198,7 +1198,7 @@ static mp_obj_t py_csi_ioctl(size_t n_args, const mp_obj_t *args) {
}
}
if (error != 0) {
if (error < 0) {
omv_csi_raise_error(error);
}