summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-11-16 01:53:25 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-24 18:17:50 -0200
commit1ff1d88e862948ae5bfe490248c023ff8ac2855d (patch)
treebf976c9db1c2411c4d037e2e113b495957c02f4b /drivers
parentc8e57e1b766c2321aa76ee5e6878c69bd2313d62 (diff)
[media] staging: lirc_serial: Fix deadlock on resume failure
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/lirc/lirc_serial.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
index d833772ef806..befe6267d7cb 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -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 */