* [PATCH next] accel/rocket: Fix some error checking in rocket_core_init()
@ 2025-08-21 12:30 Dan Carpenter
2025-09-01 15:41 ` Tomeu Vizoso
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-08-21 12:30 UTC (permalink / raw)
To: Tomeu Vizoso
Cc: Oded Gabbay, Jeff Hugo, dri-devel, linux-kernel, kernel-janitors
The problem is that pm_runtime_get_sync() can return 1 on success so
checking for zero doesn't work. Use the pm_runtime_resume_and_get()
function instead. The pm_runtime_resume_and_get() function does
additional cleanup as well so that's a bonus as well.
Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/accel/rocket/rocket_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/rocket/rocket_core.c b/drivers/accel/rocket/rocket_core.c
index 72fb5e5798fa..abe7719c1db4 100644
--- a/drivers/accel/rocket/rocket_core.c
+++ b/drivers/accel/rocket/rocket_core.c
@@ -74,7 +74,7 @@ int rocket_core_init(struct rocket_core *core)
pm_runtime_enable(dev);
- err = pm_runtime_get_sync(dev);
+ err = pm_runtime_resume_and_get(dev);
if (err) {
rocket_job_fini(core);
return err;
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH next] accel/rocket: Fix some error checking in rocket_core_init()
2025-08-21 12:30 [PATCH next] accel/rocket: Fix some error checking in rocket_core_init() Dan Carpenter
@ 2025-09-01 15:41 ` Tomeu Vizoso
0 siblings, 0 replies; 2+ messages in thread
From: Tomeu Vizoso @ 2025-09-01 15:41 UTC (permalink / raw)
To: Dan Carpenter
Cc: Oded Gabbay, Jeff Hugo, dri-devel, linux-kernel, kernel-janitors
On Thu, Aug 21, 2025 at 2:30 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> The problem is that pm_runtime_get_sync() can return 1 on success so
> checking for zero doesn't work. Use the pm_runtime_resume_and_get()
> function instead. The pm_runtime_resume_and_get() function does
> additional cleanup as well so that's a bonus as well.
>
> Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/accel/rocket/rocket_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, Dan, I have applied it to drm-misc-next.
Regards,
Tomeu
> diff --git a/drivers/accel/rocket/rocket_core.c b/drivers/accel/rocket/rocket_core.c
> index 72fb5e5798fa..abe7719c1db4 100644
> --- a/drivers/accel/rocket/rocket_core.c
> +++ b/drivers/accel/rocket/rocket_core.c
> @@ -74,7 +74,7 @@ int rocket_core_init(struct rocket_core *core)
>
> pm_runtime_enable(dev);
>
> - err = pm_runtime_get_sync(dev);
> + err = pm_runtime_resume_and_get(dev);
> if (err) {
> rocket_job_fini(core);
> return err;
> --
> 2.47.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-01 15:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 12:30 [PATCH next] accel/rocket: Fix some error checking in rocket_core_init() Dan Carpenter
2025-09-01 15:41 ` Tomeu Vizoso
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.