drm/panthor: Fix the panthor_gpu_coherency_init() error path
Subsystems (3)
Boris Brezillon
maintainerPATCH 1/1 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.
--- drivers/gpu/drm/panthor/panthor_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panthor/panthor_device.c +1 -1
@@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev) ret =panthor_gpu_coherency_init (ptdev);if (ret) -return ret; + goto err_unplug_gpu; ret =panthor_mmu_init (ptdev);if (ret)
Signature · 1 line
2.49.0
Quoted 8 lines · Boris Brezillon
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 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")Reported-by Dan Carpenter <[email protected]>Signed-off-by Boris Brezillon <[email protected]>
Good catch!
Best regards,
Liviu
Quoted 20 lines
--- drivers/gpu/drm/panthor/panthor_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/panthor/panthor_device.c +1
-1@@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev) ret =panthor_gpu_coherency_init (ptdev);if (ret) -return ret; + goto err_unplug_gpu; ret =panthor_mmu_init (ptdev);if (ret)Signature · 1 line
2.49.0
Signature · 8 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯Quoted 8 lines · Boris Brezillon
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 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")Reported-by Dan Carpenter <[email protected]>Signed-off-by Boris Brezillon <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/panthor/panthor_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/panthor/panthor_device.c +1
-1@@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev) ret =panthor_gpu_coherency_init (ptdev);if (ret) -return ret; + goto err_unplug_gpu; ret =panthor_mmu_init (ptdev);if (ret)
Quoted 8 lines · On Mon, 14 Apr 2025 15:01:20 +0200 Boris Brezillon…
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 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")Reported-by Dan Carpenter <[email protected]>Signed-off-by Boris Brezillon <[email protected]>
Queued to drm-misc-next.
Quoted 17 lines
--- drivers/gpu/drm/panthor/panthor_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/panthor/panthor_device.c +1
-1@@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev) ret =panthor_gpu_coherency_init (ptdev);if (ret) -return ret; + goto err_unplug_gpu; ret =panthor_mmu_init (ptdev);if (ret)