[media] staging: lirc_serial: Fix deadlock on resume failure
authorBen Hutchings <ben@decadent.org.uk>
Wed, 16 Nov 2011 04:53:25 +0000 (01:53 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 20:17:50 +0000 (18:17 -0200)
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>
drivers/staging/media/lirc/lirc_serial.c

index d833772ef806b95c4b4ed1faa0a09a5d1a59fced..befe6267d7cbbec4d3e88b127101142f0d02a6eb 100644 (file)
@@ -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 */