Re: [PATCH] iio: frequency: adf4350: Return -ENOMEM on memory allocation failure

From: Jonathan Cameron

Date: Sat Feb 14 2026 - 14:37:12 EST


On Wed, 11 Feb 2026 19:39:43 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Wed, Feb 11, 2026 at 7:10 PM Antoniu Miclaus
> <antoniu.miclaus@xxxxxxxxxx> wrote:
> >
> > adf4350_parse_dt() returns NULL only when devm_kzalloc() fails. The
> > caller should return -ENOMEM in this case, not -EINVAL.
>
> Right, and the memory allocator dumps enough info if it happens.
> Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
I dropped the fixes tag as seems inappropriate for something that doesn't
happen except in the death throws of a platform and where it only gave
a wrong error code. With that gone, applied.

Thanks,

Jonathan

>
> ...
>
> > pdata = dev_get_platdata(&spi->dev);
>
> Side note: Have you considered killing legacy platform data?
>