Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-21 08:05:28 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-21 08:05:29 +0200
commit9fc50c72c1ee5d975cafbae93f93f23aaaa066c3 (patch)
tree0aa85698bd8d02863d5f6f5e0b6df6c8ecc56e7b
parent98cf72338d661a6cf71c3785726130a704f3b16d (diff)
soc/fsl/qe: Fix an error code in qe_pin_request() (bsc#1051510).
-rw-r--r--drivers/soc/fsl/qe/gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c
index 0aaf429f31d5..b5a7107a9c0a 100644
--- a/drivers/soc/fsl/qe/gpio.c
+++ b/drivers/soc/fsl/qe/gpio.c
@@ -152,8 +152,10 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index)
if (err < 0)
goto err0;
gc = gpio_to_chip(err);
- if (WARN_ON(!gc))
+ if (WARN_ON(!gc)) {
+ err = -ENODEV;
goto err0;
+ }
if (!of_device_is_compatible(gc->of_node, "fsl,mpc8323-qe-pario-bank")) {
pr_debug("%s: tried to get a non-qe pin\n", __func__);