* [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR
@ 2019-12-10 15:05 Gustavo A. R. Silva
2019-12-10 15:13 ` Dan Murphy
2019-12-10 16:35 ` Marc Kleine-Budde
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2019-12-10 15:05 UTC (permalink / raw)
To: Dan Murphy, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Sean Nyekjaer
Cc: linux-can, netdev, linux-kernel, Gustavo A. R. Silva
Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config.
The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio.
This bug was detected with the help of Coccinelle.
Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/can/m_can/tcan4x5x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
index 4e1789ea2bc3..6676ecec48c3 100644
--- a/drivers/net/can/m_can/tcan4x5x.c
+++ b/drivers/net/can/m_can/tcan4x5x.c
@@ -355,7 +355,7 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake",
GPIOD_OUT_HIGH);
if (IS_ERR(tcan4x5x->device_wake_gpio)) {
- if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER)
+ if (PTR_ERR(tcan4x5x->device_wake_gpio) == -EPROBE_DEFER)
return -EPROBE_DEFER;
tcan4x5x_disable_wake(cdev);
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR
2019-12-10 15:05 [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
@ 2019-12-10 15:13 ` Dan Murphy
2019-12-10 16:35 ` Marc Kleine-Budde
1 sibling, 0 replies; 4+ messages in thread
From: Dan Murphy @ 2019-12-10 15:13 UTC (permalink / raw)
To: Gustavo A. R. Silva, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Sean Nyekjaer
Cc: linux-can, netdev, linux-kernel
Gustavo
On 12/10/19 9:05 AM, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config.
>
> The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio.
>
> This bug was detected with the help of Coccinelle.
>
> Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/net/can/m_can/tcan4x5x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
> index 4e1789ea2bc3..6676ecec48c3 100644
> --- a/drivers/net/can/m_can/tcan4x5x.c
> +++ b/drivers/net/can/m_can/tcan4x5x.c
> @@ -355,7 +355,7 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
> tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake",
> GPIOD_OUT_HIGH);
> if (IS_ERR(tcan4x5x->device_wake_gpio)) {
> - if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER)
> + if (PTR_ERR(tcan4x5x->device_wake_gpio) == -EPROBE_DEFER)
> return -EPROBE_DEFER;
>
> tcan4x5x_disable_wake(cdev);
Acked-by: Dan Murphy <dmurphy@ti.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR
@ 2019-12-10 15:13 ` Dan Murphy
0 siblings, 0 replies; 4+ messages in thread
From: Dan Murphy @ 2019-12-10 15:13 UTC (permalink / raw)
To: Gustavo A. R. Silva, Wolfgang Grandegger, Marc Kleine-Budde,
David S. Miller, Sean Nyekjaer
Cc: linux-can, netdev, linux-kernel
Gustavo
On 12/10/19 9:05 AM, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config.
>
> The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio.
>
> This bug was detected with the help of Coccinelle.
>
> Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/net/can/m_can/tcan4x5x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c
> index 4e1789ea2bc3..6676ecec48c3 100644
> --- a/drivers/net/can/m_can/tcan4x5x.c
> +++ b/drivers/net/can/m_can/tcan4x5x.c
> @@ -355,7 +355,7 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev)
> tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake",
> GPIOD_OUT_HIGH);
> if (IS_ERR(tcan4x5x->device_wake_gpio)) {
> - if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER)
> + if (PTR_ERR(tcan4x5x->device_wake_gpio) == -EPROBE_DEFER)
> return -EPROBE_DEFER;
>
> tcan4x5x_disable_wake(cdev);
Acked-by: Dan Murphy <dmurphy@ti.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR
2019-12-10 15:05 [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2019-12-10 15:13 ` Dan Murphy
@ 2019-12-10 16:35 ` Marc Kleine-Budde
1 sibling, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2019-12-10 16:35 UTC (permalink / raw)
To: Gustavo A. R. Silva, Dan Murphy, Wolfgang Grandegger,
David S. Miller, Sean Nyekjaer
Cc: linux-can, netdev, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 709 bytes --]
On 12/10/19 4:05 PM, Gustavo A. R. Silva wrote:
> Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config.
>
> The proper pointer to be passed as argument is tcan4x5x->device_wake_gpio.
>
> This bug was detected with the help of Coccinelle.
>
> Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied to linux-can.
Tnx,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-10 16:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-10 15:05 [PATCH][next] can: tcan45x: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2019-12-10 15:13 ` Dan Murphy
2019-12-10 15:13 ` Dan Murphy
2019-12-10 16:35 ` Marc Kleine-Budde
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.