The driver depends on the existence of aliases and will read out-of-bounds if they are missing for a node. Make failure graceful by aborting before that happens. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/pinctrl/pinctrl-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 4f0951bb289a..1fdb9a913ad3 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -334,6 +334,9 @@ static int rockchip_gpio_probe(struct device_d *dev) int ret, bankno; bankno = of_alias_get_id(dev->device_node, "gpio"); + if (bankno < 0) + return bankno; + bank = &ctrl->pin_banks[bankno]; gpio = &bank->bgpio_chip.gc; -- 2.30.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox