Skip to content

Commit 693bdaa

Browse files
dtorLinus Walleij
authored andcommitted
ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
If, while locating GPIOs by name, we get probe deferral, we should immediately report it to caller rather than trying to fall back to parsing unnamed GPIOs from _CRS block. Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]> Acked-by: Mika Westerberg <[email protected]> Acked-and-Tested-by: Hans de Goede <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 8a146fb commit 693bdaa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,10 @@ struct gpio_desc *acpi_find_gpio(struct device *dev,
577577
}
578578

579579
desc = acpi_get_gpiod_by_index(adev, propname, idx, &info);
580-
if (!IS_ERR(desc) || (PTR_ERR(desc) == -EPROBE_DEFER))
580+
if (!IS_ERR(desc))
581581
break;
582+
if (PTR_ERR(desc) == -EPROBE_DEFER)
583+
return ERR_CAST(desc);
582584
}
583585

584586
/* Then from plain _CRS GPIOs */

0 commit comments

Comments
 (0)