summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab2011-07-29 07:26:59 +0200
committerMauro Carvalho Chehab2011-07-31 05:51:11 +0200
commit6d51477470728074cea396a0127d73c5590dd441 (patch)
tree779274c3d5c089b559bc47c902347c4949715738 /drivers/media/video/em28xx
parent[media] rc-main: Fix device de-registration logic (diff)
downloadkernel-qcow2-linux-6d51477470728074cea396a0127d73c5590dd441.tar.gz
kernel-qcow2-linux-6d51477470728074cea396a0127d73c5590dd441.tar.xz
kernel-qcow2-linux-6d51477470728074cea396a0127d73c5590dd441.zip
[media] em28xx: Fix IR unregister logic
The input stop() callback already calls the em28xx_ir_stop method. Calling it again causes an oops. Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c
index 5d12b14282e3..679da4804281 100644
--- a/drivers/media/video/em28xx/em28xx-input.c
+++ b/drivers/media/video/em28xx/em28xx-input.c
@@ -463,11 +463,11 @@ int em28xx_ir_fini(struct em28xx *dev)
if (!ir)
return 0;
- em28xx_ir_stop(ir->rc);
- rc_unregister_device(ir->rc);
- kfree(ir);
+ if (ir->rc)
+ rc_unregister_device(ir->rc);
/* done */
+ kfree(ir);
dev->ir = NULL;
return 0;
}