diff options
| author | Dan Carpenter <dan.carpenter@linaro.org> | 2025-08-21 15:30:19 +0300 |
|---|---|---|
| committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2025-09-01 12:11:28 +0200 |
| commit | 09e6d39cc83b18a17857b8d4d6a8902bc87dfbc2 (patch) | |
| tree | 75820fd48aae5c6d372311e907e7a4cdb930988f | |
| parent | 78e399955d352a2387a4b22713385a0c5d737685 (diff) | |
accel/rocket: Fix some error checking in rocket_core_init()
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>
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Link: https://lore.kernel.org/r/aKcRW6fsRP_o5C_y@stanley.mountain
| -rw-r--r-- | drivers/accel/rocket/rocket_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
