aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/input/misc/soc_button_array.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-05-29 19:54:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-05-29 19:54:21 -0700
commitd8f797c60661a90ee26ca9330cf85ede9aa2ec17 (patch)
tree5038609885fc3e4cb7f329d974875ac4411c6af5 /drivers/input/misc/soc_button_array.c
parentInput: tsc2007 - move header file out of I2C realm (diff)
parentLinux 4.12-rc3 (diff)
downloadwireguard-linux-d8f797c60661a90ee26ca9330cf85ede9aa2ec17.tar.xz
wireguard-linux-d8f797c60661a90ee26ca9330cf85ede9aa2ec17.zip
Merge tag 'v4.12-rc3' into next
Sync with mainline to bring in changes in platform drovers dropping calls to sparse_keymap_free() so that we can remove it for good.
Diffstat (limited to '')
-rw-r--r--drivers/input/misc/soc_button_array.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index f210a3322559..e37d37273182 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -320,9 +320,10 @@ static int soc_button_probe(struct platform_device *pdev)
button_info = (struct soc_button_info *)id->driver_data;
}
- if (gpiod_count(dev, NULL) <= 0) {
+ error = gpiod_count(dev, NULL);
+ if (error < 0) {
dev_dbg(dev, "no GPIO attached, ignoring...\n");
- return -ENODEV;
+ return error;
}
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);