Skip to content

Commit

Permalink
[media] em28xx: Fix IR unregister logic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Jul 31, 2011
1 parent b05681b commit 6d51477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/em28xx/em28xx-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d51477

Please sign in to comment.