* [PATCH] drm/vc4: platform_get_irq_byname() returns an int
@ 2026-02-23 15:53 Greg Kroah-Hartman
2026-03-06 0:08 ` Maíra Canal
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-02-23 15:53 UTC (permalink / raw)
To: dri-devel
Cc: linux-kernel, Greg Kroah-Hartman, Maxime Ripard, Dave Stevenson,
Maíra Canal, Raspberry Pi Kernel Maintenance,
Maarten Lankhorst, Thomas Zimmermann, David Airlie,
Simona Vetter, stable
platform_get_irq_byname() will return a negative value if an error
happens, so it should be checked and not just passed directly into
devm_request_threaded_irq() hoping all will be ok.
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: "Maíra Canal" <mcanal@igalia.com>
Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: stable <stable@kernel.org>
Assisted-by: gkh_clanker_2000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index fda214b5a466..ac1c484c8a89 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2449,17 +2449,22 @@ static int vc4_hdmi_hotplug_init(struct vc4_hdmi *vc4_hdmi)
int ret;
if (vc4_hdmi->variant->external_irq_controller) {
- unsigned int hpd_con = platform_get_irq_byname(pdev, "hpd-connected");
- unsigned int hpd_rm = platform_get_irq_byname(pdev, "hpd-removed");
+ int hpd = platform_get_irq_byname(pdev, "hpd-connected");
+ if (hpd < 0)
+ return hpd;
- ret = devm_request_threaded_irq(&pdev->dev, hpd_con,
+ ret = devm_request_threaded_irq(&pdev->dev, hpd,
NULL,
vc4_hdmi_hpd_irq_thread, IRQF_ONESHOT,
"vc4 hdmi hpd connected", vc4_hdmi);
if (ret)
return ret;
- ret = devm_request_threaded_irq(&pdev->dev, hpd_rm,
+ hpd = platform_get_irq_byname(pdev, "hpd-removed");
+ if (hpd < 0)
+ return hpd;
+
+ ret = devm_request_threaded_irq(&pdev->dev, hpd,
NULL,
vc4_hdmi_hpd_irq_thread, IRQF_ONESHOT,
"vc4 hdmi hpd disconnected", vc4_hdmi);
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vc4: platform_get_irq_byname() returns an int
2026-02-23 15:53 [PATCH] drm/vc4: platform_get_irq_byname() returns an int Greg Kroah-Hartman
@ 2026-03-06 0:08 ` Maíra Canal
0 siblings, 0 replies; 2+ messages in thread
From: Maíra Canal @ 2026-03-06 0:08 UTC (permalink / raw)
To: dri-devel, Greg Kroah-Hartman
Cc: Maíra Canal, linux-kernel, Maxime Ripard, Dave Stevenson,
Raspberry Pi Kernel Maintenance, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, stable
On Mon, 23 Feb 2026 16:53:39 +0100, Greg Kroah-Hartman wrote:
> platform_get_irq_byname() will return a negative value if an error
> happens, so it should be checked and not just passed directly into
> devm_request_threaded_irq() hoping all will be ok.
>
>
Applied after adding a blank line after declaration (checkpatch warning), thanks!
[1/1] drm/vc4: platform_get_irq_byname() returns an int
commit: e597a809a2b97e927060ba182f58eb3e6101bc70
Best regards,
- Maíra
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-06 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-23 15:53 [PATCH] drm/vc4: platform_get_irq_byname() returns an int Greg Kroah-Hartman
2026-03-06 0:08 ` Maíra Canal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®