# \[PATCH\] Input: soc\_button\_array - Silence -ENOENT error on Dell XPS13 9365

- Subsystems: INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS, THE REST
- Maintainers: Dmitry Torokhov, Linus Torvalds
- List: linux-input
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-input/2017/08/8930319/t

## \[PATCH\] Input: soc\_button\_array - Silence -ENOENT error on Dell XPS13 9365

- From: Hans de Goede \<hidden\>
- Date: 2017-08-20 09:42:24 
- Message: https://ratatoskr.run/linux-input/2017/08/8930319.md

```text
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.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196679
Signed-off-by: Hans de Goede <redacted>
---
 drivers/input/misc/soc_button_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 27b99831cb97..0f7cce70f748 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -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);
-- 
2.13.4

```

## Re: \[PATCH\] Input: soc\_button\_array - Silence -ENOENT error on Dell XPS13 9365

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2017-08-20 16:29:22 
- Message: https://ratatoskr.run/linux-input/2017/08/8930320.md

```text
On Sun, Aug 20, 2017 at 11:42:21AM +0200, Hans de Goede wrote:
> 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.
> 
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196679
> Signed-off-by: Hans de Goede <redacted>

Applied, thank you.

> ---
>  drivers/input/misc/soc_button_array.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
> index 27b99831cb97..0f7cce70f748 100644
> --- a/drivers/input/misc/soc_button_array.c
> +++ b/drivers/input/misc/soc_button_array.c
> @@ -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);
> -- 
> 2.13.4
> 

-- 
Dmitry
```
