Skip to content

Commit d37fe70

Browse files
bbrezillonginkage
authored andcommitted
drm/panthor: Fix the panthor_gpu_coherency_init() error path
The panthor_gpu_coherency_init() call has been moved around, but the error path hasn't been adjusted accordingly. Make sure we undo what has been done before this call in case of failure. Fixes: 7d5a3b2 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Link: https://lore.kernel.org/r/20250414130120.581274-1-boris.brezillon@collabora.com Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
1 parent f4143da commit d37fe70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panthor/panthor_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ int panthor_device_init(struct panthor_device *ptdev)
241241

242242
ret = pm_runtime_resume_and_get(ptdev->base.dev);
243243
if (ret)
244-
goto err_unplug_gpu;
244+
return ret;
245245

246246
/* If PM is disabled, we need to call panthor_device_resume() manually. */
247247
if (!IS_ENABLED(CONFIG_PM)) {
@@ -256,7 +256,7 @@ int panthor_device_init(struct panthor_device *ptdev)
256256

257257
ret = panthor_gpu_coherency_init(ptdev);
258258
if (ret)
259-
return ret;
259+
goto err_unplug_gpu;
260260

261261
ret = panthor_mmu_init(ptdev);
262262
if (ret)

0 commit comments

Comments
 (0)