Re: [PATCH v4 6/9] iio: temperature: ltc2983: Use fwnode_property_present() for optional properties

From: Andy Shevchenko

Date: Tue Jun 02 2026 - 19:27:31 EST


On Wed, May 27, 2026 at 05:19:45PM +0100, Jonathan Cameron wrote:
> On Mon, 25 May 2026 19:39:33 +0300
> Liviu Stan <liviu.stan@xxxxxxxxxx> wrote:
>
> > Checking fwnode_property_read_u32() return value with if (!ret)
> > silently swallows meaningful error codes when a property is present
> > but malformed. Use fwnode_property_present() first so that absence
> > uses the default while a present but unreadable property returns
> > a proper error.
> >
> > Signed-off-by: Liviu Stan <liviu.stan@xxxxxxxxxx>
> Applied,

With const char *propname defined this all may be made much shorter.

--
With Best Regards,
Andy Shevchenko