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

From: Jonathan Cameron

Date: Wed Jun 03 2026 - 10:11:11 EST


On Wed, 3 Jun 2026 02:26:17 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> 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.
True. Maybe an additional cleanup on top for next cycle?
>