Re: [PATCH v4] iio: dac: mcp47feb02: Fix passing uninitialized vref1_uV for no Vref1 case

From: David Lechner

Date: Thu Jun 04 2026 - 12:35:46 EST


On Thu, Jun 4, 2026 at 3:47 PM Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx> wrote:
>
> Ensure that if a device has Vref1 but reading the regulator returns an
> error, mcp47feb02_init_ctrl_regs() is not called with an uninitialized
> vref1_uV value. Also add a device_property_present() check for the Vref1
> supply before reading the regulator.
>
> Fixes: dd154646d292 ("iio: dac: mcp47feb02: Fix Vref validation [1-999] case")
> Reported-by: Dan Carpenter <error27@xxxxxxxxx>
> Closes: https://lore.kernel.org/all/adiPnla0M5EzvgD-@stanley.mountain/
>
> Signed-off-by: Ariana Lazar <ariana.lazar@xxxxxxxxxxxxx>
> ---

Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>