Skip to content

Commit

Permalink
gpiolib: probe deferral error reporting
Browse files Browse the repository at this point in the history
Actually report the error code from devm_regulator_get() which may as
well just be a probe deferral.

This is e.g. what one gets upon booting a Colibri T20:

gpiochip_add_data_with_key: GPIOs 0..223 (tegra-gpio) failed to register

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Marcel Ziswiler authored and Linus Walleij committed Jul 29, 2018
1 parent f78709a commit 1777fc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,9 +1414,9 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
err_free_gdev:
ida_simple_remove(&gpio_ida, gdev->id);
/* failures here can mean systems won't boot... */
pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__,
pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__,
gdev->base, gdev->base + gdev->ngpio - 1,
chip->label ? : "generic");
chip->label ? : "generic", status);
kfree(gdev);
return status;
}
Expand Down

0 comments on commit 1777fc9

Please sign in to comment.