summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-04-16 12:55:11 +0300
committerBartosz Golaszewski <brgl@bgdev.pl>2025-04-17 15:22:05 +0200
commitb709d676c1029458261121da6ccf65ecbb56f73c (patch)
treeafdec689e82ef98dd39dc3a029377ffef9ab1270
parentd4fe58c8ea17db3e76cf80ad0fcdc655bba0153c (diff)
gpiolib: Print actual error when descriptor contains an error pointer
Print the actual error when descriptor contains an error pointer. This might help debugging those rare cases. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-4-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index e2716e20b0e4..e8e75da7b177 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2443,7 +2443,7 @@ static int validate_desc(const struct gpio_desc *desc, const char *func)
return 0;
if (IS_ERR(desc)) {
- pr_warn("%s: invalid GPIO (errorpointer)\n", func);
+ pr_warn("%s: invalid GPIO (errorpointer: %pe)\n", func, desc);
return PTR_ERR(desc);
}