提交 b05ae928 编写于 作者: D Dan Carpenter 提交者: Yang Yingliang

soc/fsl/qe: Fix an error code in qe_pin_request()

[ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ]

We forgot to set "err" on this error path.

Fixes: 1a2d397a ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NLi Yang <leoyang.li@nxp.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 bb82e289
...@@ -179,8 +179,10 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index) ...@@ -179,8 +179,10 @@ struct qe_pin *qe_pin_request(struct device_node *np, int index)
if (err < 0) if (err < 0)
goto err0; goto err0;
gc = gpio_to_chip(err); gc = gpio_to_chip(err);
if (WARN_ON(!gc)) if (WARN_ON(!gc)) {
err = -ENODEV;
goto err0; goto err0;
}
if (!of_device_is_compatible(gc->of_node, "fsl,mpc8323-qe-pario-bank")) { 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__); pr_debug("%s: tried to get a non-qe pin\n", __func__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册