Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues: - [High] devm_request_threaded_irq() is improperly used in a component bind() callback, causing resource leaks on unbind() and -EBUSY failures on re-bind. -- commit 227c25b0617d912242b79d253aafb0a1dcfaa430 Author: Cristian Ciocaltea <[email protected]> Subject: drm/rockchip: dw_hdmi_qp: Control the HPD IRQ line via the bridge HPD ops The commit changes the HPD IRQ to be requested with IRQF_NO_AUTOEN and manages its state explicitly through the bridge HPD ops. It also removes the IRQF_SHARED flag since there are no other users of this IRQ. > diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > index ecf12403101da..1c547016ee009 100644 > --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c [ ... ] > @@ -688,14 +709,14 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, > struct device *master, > if (plat_data.cec_irq < 0) > return plat_data.cec_irq; > > - irq = platform_get_irq_byname(pdev, "hpd"); > - if (irq < 0) > - return irq; > + hdmi->hpd_irq = platform_get_irq_byname(pdev, "hpd"); > + if (hdmi->hpd_irq < 0) > + return hdmi->hpd_irq; > > - ret = devm_request_threaded_irq(dev, irq, > + ret = devm_request_threaded_irq(dev, hdmi->hpd_irq, > cfg->ctrl_ops->hardirq_callback, > cfg->ctrl_ops->irq_callback, > - IRQF_SHARED, "dw-hdmi-qp-hpd", > + IRQF_NO_AUTOEN, "dw-hdmi-qp-hpd", > hdmi); > if (ret) > return ret; [Severity: High] This isn't a bug introduced by this patch, but dropping the IRQF_SHARED flag here exposes a pre-existing resource leak as a hard failure during re-bind. Because devm_request_threaded_irq() is used in the component bind() callback (dw_hdmi_qp_rockchip_bind()), the IRQ allocation is tied to the platform device, not the component lifecycle. When the component is unbound (e.g., via sysfs or DRM master unbind), the IRQ is not freed. Previously, with IRQF_SHARED, a subsequent re-bind would succeed despite leaking another registration. Now that IRQF_SHARED is removed, if a user unbinds and then re-binds the component, won't devm_request_threaded_irq() fail with -EBUSY, breaking the display driver until a full module reload? Could this be fixed by using request_threaded_irq() and explicitly freeing it in the component unbind() callback? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=39
