Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803040401.3067484-2-ruanjinjie@huawei.com

authored by

Ruan Jinjie and committed by
Steven Price
d7a407bc ad1367f8

+6 -6
+2 -2
drivers/gpu/drm/panfrost/panfrost_gpu.c
··· 390 390 dma_set_max_seg_size(pfdev->dev, UINT_MAX); 391 391 392 392 irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "gpu"); 393 - if (irq <= 0) 394 - return -ENODEV; 393 + if (irq < 0) 394 + return irq; 395 395 396 396 err = devm_request_irq(pfdev->dev, irq, panfrost_gpu_irq_handler, 397 397 IRQF_SHARED, KBUILD_MODNAME "-gpu", pfdev);
+2 -2
drivers/gpu/drm/panfrost/panfrost_job.c
··· 810 810 spin_lock_init(&js->job_lock); 811 811 812 812 js->irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "job"); 813 - if (js->irq <= 0) 814 - return -ENODEV; 813 + if (js->irq < 0) 814 + return js->irq; 815 815 816 816 ret = devm_request_threaded_irq(pfdev->dev, js->irq, 817 817 panfrost_job_irq_handler,
+2 -2
drivers/gpu/drm/panfrost/panfrost_mmu.c
··· 755 755 int err, irq; 756 756 757 757 irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "mmu"); 758 - if (irq <= 0) 759 - return -ENODEV; 758 + if (irq < 0) 759 + return irq; 760 760 761 761 err = devm_request_threaded_irq(pfdev->dev, irq, 762 762 panfrost_mmu_irq_handler,