From: Waqar Hameed Date: Tue, 5 Aug 2025 09:33:33 +0000 (+0200) Subject: gpio: twl4030: Remove error print for devm_add_action_or_reset() X-Git-Tag: v6.18-rc1~168^2~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d1e68fb1efd2fe951d68cf05460e3672d4a846d;p=thirdparty%2Fkernel%2Fstable.git gpio: twl4030: Remove error print 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 Link: https://lore.kernel.org/r/pndjz3im7te.a.out@axis.com Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c index a33dc7c7e7a08..a851702befdea 100644 --- a/drivers/gpio/gpio-twl4030.c +++ b/drivers/gpio/gpio-twl4030.c @@ -597,9 +597,7 @@ no_irqs: ret = devm_add_action_or_reset(&pdev->dev, gpio_twl4030_power_off_action, d); if (ret) - return dev_err_probe(&pdev->dev, ret, - "failed to install power off handler\n"); - + return ret; } return 0;