]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: pac1934: Return -ENOMEM on memory allocation failure
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Wed, 11 Feb 2026 17:10:05 +0000 (19:10 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Feb 2026 08:24:22 +0000 (08:24 +0000)
commit25ac1dea217f328ea71f8f09bfb290534de3cbce
tree006fe21742f12cef6c9125f8ee60b284907b6306
parent8e901c49ffc8d59adabae4020724f96770d35db7
iio: adc: pac1934: Return -ENOMEM on memory allocation failure

devm_kzalloc() returns NULL on allocation failure. The appropriate error
code for this condition is -ENOMEM, 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>
drivers/iio/adc/pac1934.c