]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
gpiolib: probe deferral error reporting
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>
Fri, 20 Jul 2018 07:54:49 +0000 (09:54 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 29 Jul 2018 20:48:28 +0000 (22:48 +0200)
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>
drivers/gpio/gpiolib.c

index 464d5ba79f96691b706c8ac2dfa7b75f16c302ca..bdbfc95793e73c7d7a7a87d53dc38ca5f0b4c8d4 100644 (file)
@@ -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;
 }