[media] rc: img-ir: fix error in parameters passed to irq_free()
authorSifan Naeem <sifan.naeem@imgtec.com>
Tue, 10 Feb 2015 10:41:56 +0000 (07:41 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 8 Apr 2015 15:52:50 +0000 (12:52 -0300)
commit80ccf4ad06dc9d2f06a8347b2d309cdc959f72b3
tree81cf01ba15a6b71f06559bea721cd93bf7028dbd
parent974e08d8f02fdfc97915054d8e0c7d3cbe6b9e6e
[media] rc: img-ir: fix error in parameters passed to irq_free()

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: 160a8f8aec4d ("[media] rc: img-ir: add base driver")

Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Cc: <stable@vger.kernel.org> # 3.15+
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/img-ir/img-ir-core.c