From: Antoniu Miclaus Date: Wed, 11 Feb 2026 17:10:06 +0000 (+0200) Subject: iio: frequency: adf4350: Return -ENOMEM on memory allocation failure X-Git-Tag: v7.1-rc1~17^2~120^2~206 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc2cb23607eb0ff99a67e260ec33d01c6e6f1290;p=thirdparty%2Fkernel%2Flinux.git iio: frequency: adf4350: Return -ENOMEM on memory allocation failure adf4350_parse_dt() returns NULL only when devm_kzalloc() fails. The caller should return -ENOMEM in this case, not -EINVAL. Signed-off-by: Antoniu Miclaus Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index ed1741165f555..3883b63dcc3ce 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -607,7 +607,7 @@ static int adf4350_probe(struct spi_device *spi) if (dev_fwnode(&spi->dev)) { pdata = adf4350_parse_dt(&spi->dev); if (pdata == NULL) - return -EINVAL; + return -ENOMEM; } else { pdata = dev_get_platdata(&spi->dev); }