Skip to content

Commit c2c7af9

Browse files
Sifan Naeemsashalevin
Sifan Naeem
authored andcommitted
[media] rc: img-ir: fix error in parameters passed to irq_free()
[ Upstream commit 80ccf4a ] img_ir_remove() passes a pointer to the ISR function as the 2nd parameter to irq_free() instead of a pointer to the device data structure. This issue causes unloading img-ir module to fail with the below warning after building and loading img-ir as a module. WARNING: CPU: 2 PID: 155 at ../kernel/irq/manage.c:1278 __free_irq+0xb4/0x214() Trying to free already-free IRQ 58 Modules linked in: img_ir(-) CPU: 2 PID: 155 Comm: rmmod Not tainted 3.14.0 #55 ... Call Trace: ... [<8048d420>] __free_irq+0xb4/0x214 [<8048d6b4>] free_irq+0xac/0xf4 [<c009b130>] img_ir_remove+0x54/0xd4 [img_ir] [<8073ded0>] platform_drv_remove+0x30/0x54 ... Fixes: 160a8f8 ("[media] rc: img-ir: add base driver") Signed-off-by: Sifan Naeem <[email protected]> Cc: <[email protected]> # 3.15+ Acked-by: James Hogan <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 3b2b5be commit c2c7af9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/rc/img-ir/img-ir-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int img_ir_remove(struct platform_device *pdev)
146146
{
147147
struct img_ir_priv *priv = platform_get_drvdata(pdev);
148148

149-
free_irq(priv->irq, img_ir_isr);
149+
free_irq(priv->irq, priv);
150150
img_ir_remove_hw(priv);
151151
img_ir_remove_raw(priv);
152152

0 commit comments

Comments
 (0)