Skip to content

Commit 0506794

Browse files
committed
Merge tag 'iio-fixes-for-6.10c' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
Jonathan writes: IIO: 3rd round of fixes for 6.10 core: - Trigger check on on whether a device was using own trigger was inverted. avago,apds9306 - Checking wrong variable in an error check. * tag 'iio-fixes-for-6.10c' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: light: apds9306: Fix error handing iio: trigger: Fix condition for own trigger
2 parents 22a40d1 + 1a5cba4 commit 0506794

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/iio/industrialio-trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ int iio_trigger_attach_poll_func(struct iio_trigger *trig,
315315
* this is the case if the IIO device and the trigger device share the
316316
* same parent device.
317317
*/
318-
if (iio_validate_own_trigger(pf->indio_dev, trig))
318+
if (!iio_validate_own_trigger(pf->indio_dev, trig))
319319
trig->attached_own_device = true;
320320

321321
return ret;

drivers/iio/light/apds9306.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ static int apds9306_intg_time_set(struct apds9306_data *data, int val2)
583583
return ret;
584584

585585
intg_old = iio_gts_find_int_time_by_sel(&data->gts, intg_time_idx);
586-
if (ret < 0)
587-
return ret;
586+
if (intg_old < 0)
587+
return intg_old;
588588

589589
if (intg_old == val2)
590590
return 0;

0 commit comments

Comments
 (0)