Skip to content

Commit

Permalink
[media] staging: lirc_serial: Fix deadlock on resume failure
Browse files Browse the repository at this point in the history
A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Ben Hutchings authored and Mauro Carvalho Chehab committed Nov 24, 2011
1 parent c8e57e1 commit 1ff1d88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/media/lirc/lirc_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,10 +1127,8 @@ static int lirc_serial_resume(struct platform_device *dev)
{
unsigned long flags;

if (hardware_init_port() < 0) {
lirc_serial_exit();
if (hardware_init_port() < 0)
return -EINVAL;
}

spin_lock_irqsave(&hardware[type].lock, flags);
/* Enable Interrupt */
Expand Down

0 comments on commit 1ff1d88

Please sign in to comment.