diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-03-28 17:18:41 +0300 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2019-04-02 18:02:48 -0500 |
commit | 5674a92ca4b7e5a6a19231edd10298d30324cd27 (patch) | |
tree | d3e0fbe7063f403ace6099afc61d891b888d04f8 /drivers/soc | |
parent | 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff) | |
download | linux-5674a92ca4b7e5a6a19231edd10298d30324cd27.tar.gz linux-5674a92ca4b7e5a6a19231edd10298d30324cd27.tar.bz2 linux-5674a92ca4b7e5a6a19231edd10298d30324cd27.zip |
soc/fsl/qe: Fix an error code in qe_pin_request()
We forgot to set "err" on this error path.
Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/fsl/qe/gpio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c index 819bed0f5667..51b3a47b5a55 100644 --- a/drivers/soc/fsl/qe/gpio.c +++ b/drivers/soc/fsl/qe/gpio.c @@ -179,8 +179,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__); |