aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorWaqar Hameed <waqar.hameed@axis.com>2025-08-05 11:33:33 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-08-11 11:09:23 +0200
commit0d1e68fb1efd2fe951d68cf05460e3672d4a846d (patch)
tree2bbfe216a8c299ebd6211d6b8dc5371f4bbac105 /drivers/gpio
parent7ce73ee6dc5977fd9dbe8194e7e8073a2f9a50fb (diff)
downloadnet-0d1e68fb1efd2fe951d68cf05460e3672d4a846d.tar.gz
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 <waqar.hameed@axis.com> Link: https://lore.kernel.org/r/pndjz3im7te.a.out@axis.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-twl4030.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
index a33dc7c7e7a08d..a851702befdea7 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;