]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: Remove error prints for devm_add_action_or_reset()
authorWaqar Hameed <waqar.hameed@axis.com>
Tue, 5 Aug 2025 09:33:33 +0000 (11:33 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 10:57:08 +0000 (11:57 +0100)
commit65e8202f03224d56896202610a5875060bb775d9
tree3a849d5c01fd668e03036dede0d98a3e52a9b226
parentb515c701bbdfa453e2e57ae542863f1baf2c35b1
iio: Remove error prints for devm_add_action_or_reset()

When `devm_add_action_or_reset()` fails, it is due to a failed memory
allocation and will thus return `-ENOMEM`. `dev_err_probe()` doesn't do
anything when error is `-ENOMEM`. Therefore, remove the useless call to
`dev_err_probe()` when `devm_add_action_or_reset()` fails, and just
return the value instead.

Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/pndectqm7te.a.out@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
19 files changed:
drivers/iio/accel/msa311.c
drivers/iio/adc/ad4130.c
drivers/iio/adc/ad7124.c
drivers/iio/adc/ad7173.c
drivers/iio/adc/mt6577_auxadc.c
drivers/iio/adc/pac1921.c
drivers/iio/adc/rockchip_saradc.c
drivers/iio/adc/ti-ads1119.c
drivers/iio/adc/ti-ads7924.c
drivers/iio/frequency/adf4350.c
drivers/iio/light/al3000a.c
drivers/iio/light/apds9306.c
drivers/iio/light/bh1745.c
drivers/iio/light/opt4001.c
drivers/iio/light/opt4060.c
drivers/iio/magnetometer/als31300.c
drivers/iio/magnetometer/tmag5273.c
drivers/iio/proximity/vl53l0x-i2c.c
drivers/iio/temperature/mlx90635.c