Skip to contentSkip to conversation

gpiolib: make gpiochip_add() show a better error message

PATCH New Ben Dooks 1 participant 1 message May 6, 2010 GPIO

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 gpiolib: make gpiochip_add() show a better error message

The current message, 'not registered' is confusing as it implies it was not registered with something, whereas printing 'failed to register' implies it was the gpiochip_add() call that did not work correctly.

---
 drivers/gpio/gpiolib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpio/gpiolib.c +1 -1
index eb0c3fe..384d993 100644
@@ -1106,7 +1106,7 @@ unlock:
 fail:
 	/* failures here can mean systems won't boot... */
 	if (status)
-		pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n",
+		pr_err("gpiochip_add: gpios %d..%d (%s) failed to register\n",
 			chip->base, chip->base + chip->ngpio - 1,
 			chip->label ? : "generic");
 	return status;
Signature · 1 line
1.6.3.3