Skip to content

Commit

Permalink
soc/fsl/qe: Fix an error code in qe_pin_request()
Browse files Browse the repository at this point in the history
We forgot to set "err" on this error path.

Fixes: 1a2d397 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Li Yang <[email protected]>
  • Loading branch information
Dan Carpenter authored and Li Yang committed Apr 2, 2019
1 parent 9e98c67 commit 5674a92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/soc/fsl/qe/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit 5674a92

Please sign in to comment.