drm/exynos: exynos_hdmi: Pass correct pointer to free_irq()
Subsystems (3)
PATCH 1/1 drm/exynos: exynos_hdmi: Pass correct pointer to free_irq()
free_irq() expects the same pointer that was passed to request_threaded_irq(), otherwise the IRQ is not freed.
The issue was found using the following coccinelle script:
<smpl>
@r1@
type T;
T devid;
@@request_threaded_irq(..., devid)
@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)
@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>
--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_hdmi.c +1 -1
@@ -2082,7 +2082,7 @@ static int hdmi_remove(struct platform_device *pdev)pm_runtime_disable (dev); -free_irq (hdata->irq, hdata); +free_irq (hdata->irq, ctx);/* hdmiphy i2c driver */
Signature · 1 line
1.8.0
Good point,
Quoted 19 lines · Lars-Peter Clausen
free_irq()expects the same pointer that was passed torequest_threaded_irq(), otherwise the IRQ is not freed.The issue was found using the following coccinelle script:
<smpl>
@r1@
type T;
T devid;
@@request_threaded_irq(..., devid)@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)
Quoted 7 lines
@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>Signed-off-by Lars-Peter Clausen <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/exynos/exynos_hdmi.c +1
-1@@ -2082,7 +2082,7 @@ static int hdmi_remove(struct platform_device *pdev)pm_runtime_disable (dev); -free_irq (hdata->irq, hdata); +free_irq (hdata->irq, ctx);/* hdmiphy i2c driver */
Signature · 3 lines
Seung-Woo Kim Samsung Software R&D Center --
Inki Dae
maintainer2013/5/21 Lars-Peter Clausen <[email protected]>
Quoted 37 lines
free_irq()expects the same pointer that was passed torequest_threaded_irq(),
otherwise the IRQ is not freed.The issue was found using the following coccinelle script:
<smpl>
@r1@
type T;
T devid;
@@request_threaded_irq(..., devid)@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>Signed-off-by Lars-Peter Clausen <[email protected]>--- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/exynos/exynos_hdmi.c +0
-0
drivers/gpu/drm/exynos/exynos_hdmi.c static int hdmi_remove(struct platform_device *pdev) · line 2087
Quoted 7 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +1
-1@@ -2082,7 +2082,7 @@ static int hdmi_remove(struct platform_device *pdev)pm_runtime_disable (dev); -free_irq (hdata->irq, hdata); +free_irq (hdata->irq, ctx);
It's better to use devm_reqeust_irq instead. Anyway that was a bug. Applied.
Thanks,
Inki Dae
Quoted 10 lines
drivers/gpu/drm/exynos/exynos_hdmi.c +0
-1/* hdmiphy i2c driver */ --1.8.0
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel