summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-29 05:26:59 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-31 03:51:11 (GMT)
commit6d51477470728074cea396a0127d73c5590dd441 (patch)
tree779274c3d5c089b559bc47c902347c4949715738 /drivers
parentb05681b91709a19b40a452f566cc852619b30082 (diff)
downloadlinux-fsl-qoriq-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')
-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 5d12b14..679da48 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;
}