Thread (19 messages) 19 messages, 4 authors, 2022-01-03
STALE1627d LANDED

[PATCH 04/12] platform/x86: x86-android-tablets: Don't return -EPROBE_DEFER from a non probe() function

From: Hans de Goede <hidden>
Date: 2021-12-29 23:14:57
Also in: linux-acpi, linux-i2c, platform-driver-x86
Subsystem: the rest, x86 platform drivers · Maintainers: Linus Torvalds, Hans de Goede, Ilpo Järvinen

The x86-android-tablets code all runs from module_init, so returning
-EPROBE_DEFER is not appropriate. Instead log an error and bail.

This path should never get hit since PINCTRL_BAYTRAIL is a bool.

Signed-off-by: Hans de Goede <redacted>
---
 drivers/platform/x86/x86-android-tablets.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/x86-android-tablets.c b/drivers/platform/x86/x86-android-tablets.c
index 4a04da27a3f4..ea033d7f4439 100644
--- a/drivers/platform/x86/x86-android-tablets.c
+++ b/drivers/platform/x86/x86-android-tablets.c
@@ -63,8 +63,10 @@ static int x86_acpi_irq_helper_get(const struct x86_acpi_irq_data *data)
 	case X86_ACPI_IRQ_TYPE_GPIOINT:
 		/* Like acpi_dev_gpio_irq_get(), but without parsing ACPI resources */
 		chip = gpiochip_find(data->chip, x86_acpi_irq_helper_gpiochip_find);
-		if (!chip)
-			return -EPROBE_DEFER;
+		if (!chip) {
+			pr_err("error cannot find GPIO chip %s\n", data->chip);
+			return -ENODEV;
+		}
 
 		gpiod = gpiochip_get_desc(chip, data->index);
 		if (IS_ERR(gpiod)) {
-- 
2.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help