[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200128135837.101811933@linuxfoundation.org>
Date: Tue, 28 Jan 2020 15:04:50 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>,
Li Yang <leoyang.li@....com>, Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.4 071/183] soc/fsl/qe: Fix an error code in qe_pin_request()
From: Dan Carpenter <dan.carpenter@...cle.com>
[ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ]
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@...cle.com>
Signed-off-by: Li Yang <leoyang.li@....com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/powerpc/sysdev/qe_lib/gpio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c
index 521e67a49dc40..4052e3d7edbd5 100644
--- a/arch/powerpc/sysdev/qe_lib/gpio.c
+++ b/arch/powerpc/sysdev/qe_lib/gpio.c
@@ -155,8 +155,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__);
--
2.20.1
Powered by blists - more mailing lists