Message ID | 20250415111124.1539366-2-andriy.shevchenko@linux.intel.com |
---|---|
State | Superseded |
Headers | show |
Series | gpiolib: Some cleanups | expand |
On Tue, Apr 15, 2025 at 1:11 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Print the actual error when descriptor contains an error pointer. > This might help debugging those rare cases. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index eb94428af6c0..0089745b381f 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2445,7 +2445,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); }
Print the actual error when descriptor contains an error pointer. This might help debugging those rare cases. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)