Re: [PATCH] iio: adc: ad4134: Fix duplicate data_read mux state request

From: Andy Shevchenko

Date: Wed Nov 04 2026 - 06:02:56 EST


On Wed, Nov 04, 2026 at 12:47:19PM +0800, Chen Ni wrote:
> devm_mux_state_get(dev, "data_read") is called twice in a row. The
> second call's result is stored directly into
> st->mux_st[AD4134_DOUT0_INPUT] without error checking, and then
> immediately overwritten by the first call's result.
>
> Remove the duplicate call and check the return value before saving the
> state.

Make the line lengths more balanced. Refer to the functions
as simply as func().

devm_mux_state_get() is called twice in a row. The second call's result
is stored directly into st->mux_st[AD4134_DOUT0_INPUT] without error
checking, and then immediately overwritten by the first call's result.

Remove the duplicate call and check the return value before saving the
state.

Otherwise it looks like a rebase error which went unnoticed as
the mux state is stored after the check.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko