[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>
This commit is contained in:
Mauro Carvalho Chehab 2011-07-29 02:26:59 -03:00
parent b05681b917
commit 6d51477470
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}