Skip to contentSkip to conversation

Input: soc_button_array - Silence -ENOENT error on Dell XPS13 9365

PATCH Applied Hans de Goede 2 participants 2 messages Aug 20, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: soc_button_array - Silence -ENOENT error on Dell XPS13 9365

The Dell XPS13 9365 has an INT33D2 ACPI node with no GPIOs, causing the following error in dmesg:

[    7.172275] soc_button_array: probe of INT33D2:00 failed with error -2

This commit silences this, by returning -ENODEV when there are no GPIOs.

---
 drivers/input/misc/soc_button_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/soc_button_array.c +1 -1
index 27b99831cb97..0f7cce70f748 100644
@@ -334,7 +334,7 @@ static int soc_button_probe(struct platform_device *pdev)
 	error = gpiod_count(dev, NULL);
 	if (error < 0) {
 		dev_dbg(dev, "no GPIO attached, ignoring...\n");
-		return error;
+		return -ENODEV;
 	}
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
Signature · 1 line
2.13.4
maintainer Applied
#1 lore raw
Quoted 9 lines · Hans de Goede

The Dell XPS13 9365 has an INT33D2 ACPI node with no GPIOs, causing the following error in dmesg:

[    7.172275] soc_button_array: probe of INT33D2:00 failed with error -2

This commit silences this, by returning -ENODEV when there are no GPIOs.

Applied, thank you.

Quoted 20 lines
---
 drivers/input/misc/soc_button_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/soc_button_array.c +1 -1
index 27b99831cb97..0f7cce70f748 100644
@@ -334,7 +334,7 @@ static int soc_button_probe(struct platform_device *pdev)
 	error = gpiod_count(dev, NULL);
 	if (error < 0) {
 		dev_dbg(dev, "no GPIO attached, ignoring...\n");
-		return error;
+		return -ENODEV;
 	}
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
Signature · 1 line
2.13.4
Signature · 1 line
Dmitry