diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-29 02:26:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-31 00:51:11 -0300 |
commit | 6d51477470728074cea396a0127d73c5590dd441 (patch) | |
tree | 779274c3d5c089b559bc47c902347c4949715738 /drivers | |
parent | b05681b91709a19b40a452f566cc852619b30082 (diff) | |
download | op-kernel-dev-6d51477470728074cea396a0127d73c5590dd441.zip op-kernel-dev-6d51477470728074cea396a0127d73c5590dd441.tar.gz |
[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.c | 6 |
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; } |