Re: [PATCH] iio: viperboard: Fix error handling in vprbrd_iio_read_raw
From: Maxwell Doose
Date: Tue May 05 2026 - 18:20:17 EST
On Tue, May 5, 2026 at 5:06 PM Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:
>
> On Tue, 5 May 2026 at 23:18, Salah Triki <salah.triki@xxxxxxxxx> wrote:
> >
> > The driver proceeds to the reception phase even if the preceding
> > transmission fails.
> >
> > This uses a goto error label for an early bail out and ensures the mutex is
> > properly unlocked in case of failure.
> >
> > Fixes: ffd8a6e7a778 ("iio: adc: Add viperboard adc driver")
> > Signed-off-by: Salah Triki <salah.triki@xxxxxxxxx>
>
> Nitpick, but I would add adc into the patch title ("iio: adc: viperboard: ...").
>
[snip]
>
> Code-wise LGTM.
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
>
Agree with Joshua here. Should add adc to subject but lgtm.
Reviewed-by: Maxwell Doose <m32285159@xxxxxxxxx>
best regards,
max
(p.s., might be a good idea to send a patch for this file replacing
all of the mutex_lock()s and unlock()s with guard()())
> --
> Kind regards
>
> CJD
>