* [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()
@ 2019-03-28 14:18 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:18 UTC (permalink / raw)
To: Qiang Zhao, Grant Likely; +Cc: kernel-janitors, linuxppc-dev, Li Yang
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>
---
drivers/soc/fsl/qe/gpio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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__);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()
@ 2019-03-28 14:18 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:18 UTC (permalink / raw)
To: Qiang Zhao, Grant Likely; +Cc: kernel-janitors, linuxppc-dev, Li Yang
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>
---
drivers/soc/fsl/qe/gpio.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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__);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()
2019-03-28 14:18 ` Dan Carpenter
@ 2019-04-02 23:02 ` Li Yang
-1 siblings, 0 replies; 4+ messages in thread
From: Li Yang @ 2019-04-02 23:02 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linuxppc-dev, kernel-janitors, Qiang Zhao
On Thu, Mar 28, 2019 at 9:21 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
Applied to fix branch. Thanks.
Regards,
Leo
> ---
> drivers/soc/fsl/qe/gpio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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__);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request()
@ 2019-04-02 23:02 ` Li Yang
0 siblings, 0 replies; 4+ messages in thread
From: Li Yang @ 2019-04-02 23:02 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linuxppc-dev, kernel-janitors, Qiang Zhao
On Thu, Mar 28, 2019 at 9:21 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> 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>
Applied to fix branch. Thanks.
Regards,
Leo
> ---
> drivers/soc/fsl/qe/gpio.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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__);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-02 23:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:18 [PATCH] soc/fsl/qe: Fix an error code in qe_pin_request() Dan Carpenter
2019-03-28 14:18 ` Dan Carpenter
2019-04-02 23:02 ` Li Yang
2019-04-02 23:02 ` Li Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.