Commit d7a407bc authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Steven Price

drm/panfrost: Do not check for 0 return after calling platform_get_irq_byname()

It is not possible for platform_get_irq_byname() to return 0.
Use the return value from platform_get_irq_byname().
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Signed-off-by: default avatarSteven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803040401.3067484-2-ruanjinjie@huawei.com
parent ad1367f8
...@@ -390,8 +390,8 @@ int panfrost_gpu_init(struct panfrost_device *pfdev) ...@@ -390,8 +390,8 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
dma_set_max_seg_size(pfdev->dev, UINT_MAX); dma_set_max_seg_size(pfdev->dev, UINT_MAX);
irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "gpu"); irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "gpu");
if (irq <= 0) if (irq < 0)
return -ENODEV; return irq;
err = devm_request_irq(pfdev->dev, irq, panfrost_gpu_irq_handler, err = devm_request_irq(pfdev->dev, irq, panfrost_gpu_irq_handler,
IRQF_SHARED, KBUILD_MODNAME "-gpu", pfdev); IRQF_SHARED, KBUILD_MODNAME "-gpu", pfdev);
......
...@@ -810,8 +810,8 @@ int panfrost_job_init(struct panfrost_device *pfdev) ...@@ -810,8 +810,8 @@ int panfrost_job_init(struct panfrost_device *pfdev)
spin_lock_init(&js->job_lock); spin_lock_init(&js->job_lock);
js->irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "job"); js->irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "job");
if (js->irq <= 0) if (js->irq < 0)
return -ENODEV; return js->irq;
ret = devm_request_threaded_irq(pfdev->dev, js->irq, ret = devm_request_threaded_irq(pfdev->dev, js->irq,
panfrost_job_irq_handler, panfrost_job_irq_handler,
......
...@@ -755,8 +755,8 @@ int panfrost_mmu_init(struct panfrost_device *pfdev) ...@@ -755,8 +755,8 @@ int panfrost_mmu_init(struct panfrost_device *pfdev)
int err, irq; int err, irq;
irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "mmu"); irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "mmu");
if (irq <= 0) if (irq < 0)
return -ENODEV; return irq;
err = devm_request_threaded_irq(pfdev->dev, irq, err = devm_request_threaded_irq(pfdev->dev, irq,
panfrost_mmu_irq_handler, panfrost_mmu_irq_handler,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment