diff options
| author | Antoniu Miclaus <antoniu.miclaus@analog.com> | 2026-02-11 19:10:06 +0200 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-02-23 08:24:22 +0000 |
| commit | bc2cb23607eb0ff99a67e260ec33d01c6e6f1290 (patch) | |
| tree | 2bdfa6fa1b4780300dd3f70bae045bcf03a60aeb | |
| parent | 25ac1dea217f328ea71f8f09bfb290534de3cbce (diff) | |
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 <antoniu.miclaus@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
| -rw-r--r-- | drivers/iio/frequency/adf4350.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index ed1741165f55..3883b63dcc3c 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); } |
