[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240322073725.3338266-1-peng.fan@oss.nxp.com>
Date: Fri, 22 Mar 2024 15:37:25 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: linus.walleij@...aro.org,
brgl@...ev.pl,
andy@...nel.org
Cc: linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: [PATCH V3] gpiolib: use dev_err() when gpiod_configure_flags failed
From: Peng Fan <peng.fan@....com>
When gpio-ranges property was missed to be added in the gpio node,
using dev_err() to show an error message will helping to locate issues
easier.
Signed-off-by: Peng Fan <peng.fan@....com>
---
V3:
Move gpiod_put before dev_err per Andy Shevchenko
V2:
Update commit log
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index ce94e37bcbee..b988704f5d63 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4233,8 +4233,8 @@ struct gpio_desc *gpiod_find_and_request(struct device *consumer,
ret = gpiod_configure_flags(desc, con_id, lookupflags, flags);
if (ret < 0) {
- dev_dbg(consumer, "setup of GPIO %s failed\n", con_id);
gpiod_put(desc);
+ dev_err(consumer, "setup of GPIO %s failed: %d\n", con_id, ret);
return ERR_PTR(ret);
}
--
2.37.1
Powered by blists - more mailing lists