Skip to content

Commit 99b74db

Browse files
Dan Carpenterbbrezillon
authored andcommitted
drm/panthor: Fix error code in panthor_gpu_init()
This code accidentally returns zero/success on error because of a typo. It should be "irq" instead of "ret". The other thing is that if platform_get_irq_byname() were to return zero then the error code would be cmplicated. Fortunately, it does not so we can just change <= to < 0. Fixes: 5cd894e ("drm/panthor: Add the GPU logical block") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d337332 commit 99b74db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panthor/panthor_gpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ int panthor_gpu_init(struct panthor_device *ptdev)
211211
return ret;
212212

213213
irq = platform_get_irq_byname(to_platform_device(ptdev->base.dev), "gpu");
214-
if (irq <= 0)
215-
return ret;
214+
if (irq < 0)
215+
return irq;
216216

217217
ret = panthor_request_gpu_irq(ptdev, &ptdev->gpu->irq, irq, GPU_INTERRUPTS_MASK);
218218
if (ret)

0 commit comments

Comments
 (0)