mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
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>
This commit is contained in:
parent
25ac1dea21
commit
bc2cb23607
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user