]> git.baikalelectronics.ru Git - kernel.git/commit
[media] em28xx: input: fix oops on device removal
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sat, 22 Dec 2012 13:13:38 +0000 (10:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 22 Dec 2012 18:14:37 +0000 (16:14 -0200)
commit78b7204f4f466bb420397c8e54f3dff1f45ed25c
treeda9668f3a6886514347ad8c907c477ce4c9b3a5e
parente134d21c42a9f92f1f9b653ee3b5904755cbe295
[media] em28xx: input: fix oops on device removal

When em28xx_ir_init() fails due to an configuration error, it frees the memory
of struct em28xx_IR *ir, but doesn't set the corresponding pointer in the
device struct to NULL.
On device removal, em28xx_ir_fini() gets called, which then calls
rc_unregister_device() with a pointer to freed memory.
Fixes bug 26572 (http://bugzilla.kernel.org/show_bug.cgi?id=26572)

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-input.c