Commit 74a47300 authored by Linus Walleij's avatar Linus Walleij Committed by Kalle Valo

bcma: Fail probe if GPIO subdriver fails

We currently register the BCMA core even if the GPIO portions
fail. There is no reason for this: the GPIO should register
just fine, if it fails the BCMA driver should fail.

We already gracefully handle the case where the GPIO driver is
not compiled in.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221028093000.239020-1-linus.walleij@linaro.org
parent 2b6c0e15
......@@ -344,8 +344,10 @@ static int bcma_register_devices(struct bcma_bus *bus)
err = bcma_gpio_init(&bus->drv_cc);
if (err == -ENOTSUPP)
bcma_debug(bus, "GPIO driver not activated\n");
else if (err)
else if (err) {
bcma_err(bus, "Error registering GPIO driver: %i\n", err);
return err;
}
if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
err = bcma_chipco_watchdog_register(&bus->drv_cc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment