summaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-29 09:26:59 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-31 07:51:11 +0400
commit6d51477470728074cea396a0127d73c5590dd441 (patch)
tree779274c3d5c089b559bc47c902347c4949715738 /drivers/media/video/em28xx/em28xx-input.c
parentb05681b91709a19b40a452f566cc852619b30082 (diff)
downloadlinux-6d51477470728074cea396a0127d73c5590dd441.tar.xz
[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/em28xx-input.c')
-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;
}