Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Antoniu Miclaus and committed by
Jonathan Cameron
bc2cb236 25ac1dea

+1 -1
+1 -1
drivers/iio/frequency/adf4350.c
··· 607 607 if (dev_fwnode(&spi->dev)) { 608 608 pdata = adf4350_parse_dt(&spi->dev); 609 609 if (pdata == NULL) 610 - return -EINVAL; 610 + return -ENOMEM; 611 611 } else { 612 612 pdata = dev_get_platdata(&spi->dev); 613 613 }