Re: [PATCH] iio: frequency: adf4350: Return -ENOMEM on memory allocation failure
From: Andy Shevchenko
Date: Wed Feb 11 2026 - 12:41:07 EST
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>
...
> pdata = dev_get_platdata(&spi->dev);
Side note: Have you considered killing legacy platform data?
--
With Best Regards,
Andy Shevchenko