All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] remoteproc: rcar_rproc: fix pm_runtime_get_sync error check
@ 2021-12-16 16:06 Julien Massot
  2021-12-20 13:44 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Massot @ 2021-12-16 16:06 UTC (permalink / raw)
  To: bjorn.andersson, mathieu.poirier, geert+renesas, dan.carpenter
  Cc: linux-renesas-soc, linux-remoteproc, Julien Massot

pm_runtime_get_sync can also return 1 on success, change
to use pm_runtime_resume_and_get which return 0 only on
success.

This bug has been discovered by Dan Carpenter by using Smatch
static checker.

Fixes: 285892a74f13 ("remoteproc: Add Renesas rcar driver")

Signed-off-by: Julien Massot <julien.massot@iot.bzh>
---
 drivers/remoteproc/rcar_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/rcar_rproc.c b/drivers/remoteproc/rcar_rproc.c
index 34fd867f9f8c..3408c6e51a7c 100644
--- a/drivers/remoteproc/rcar_rproc.c
+++ b/drivers/remoteproc/rcar_rproc.c
@@ -167,7 +167,7 @@ static int rcar_rproc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_enable(dev);
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret) {
 		dev_err(dev, "failed to power up\n");
 		return ret;
-- 
2.33.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] remoteproc: rcar_rproc: fix pm_runtime_get_sync error check
  2021-12-16 16:06 [PATCH 1/2] remoteproc: rcar_rproc: fix pm_runtime_get_sync error check Julien Massot
@ 2021-12-20 13:44 ` Geert Uytterhoeven
  2021-12-20 16:57   ` Mathieu Poirier
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-12-20 13:44 UTC (permalink / raw)
  To: Julien Massot
  Cc: Björn Andersson, Mathieu Poirier, Dan Carpenter,
	Linux-Renesas, open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM

On Thu, Dec 16, 2021 at 5:07 PM Julien Massot <julien.massot@iot.bzh> wrote:
> pm_runtime_get_sync can also return 1 on success, change
> to use pm_runtime_resume_and_get which return 0 only on
> success.
>
> This bug has been discovered by Dan Carpenter by using Smatch
> static checker.
>
> Fixes: 285892a74f13 ("remoteproc: Add Renesas rcar driver")
>

Please no blank lines between tags.

> Signed-off-by: Julien Massot <julien.massot@iot.bzh>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] remoteproc: rcar_rproc: fix pm_runtime_get_sync error check
  2021-12-20 13:44 ` Geert Uytterhoeven
@ 2021-12-20 16:57   ` Mathieu Poirier
  0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2021-12-20 16:57 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Julien Massot, Björn Andersson, Dan Carpenter,
	Linux-Renesas, open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM

On Mon, Dec 20, 2021 at 02:44:26PM +0100, Geert Uytterhoeven wrote:
> On Thu, Dec 16, 2021 at 5:07 PM Julien Massot <julien.massot@iot.bzh> wrote:
> > pm_runtime_get_sync can also return 1 on success, change
> > to use pm_runtime_resume_and_get which return 0 only on
> > success.
> >
> > This bug has been discovered by Dan Carpenter by using Smatch
> > static checker.
> >
> > Fixes: 285892a74f13 ("remoteproc: Add Renesas rcar driver")
> >
> 
> Please no blank lines between tags.

I have fixed the blank lines and applied this series.

Thanks,
Mathieu

> 
> > Signed-off-by: Julien Massot <julien.massot@iot.bzh>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-20 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 16:06 [PATCH 1/2] remoteproc: rcar_rproc: fix pm_runtime_get_sync error check Julien Massot
2021-12-20 13:44 ` Geert Uytterhoeven
2021-12-20 16:57   ` Mathieu Poirier

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.