A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
---
I haven't seen any report of this deadlock, but it seems pretty obvious.

Ben.

 drivers/staging/media/lirc/lirc_serial.c |    4 +---
 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 d833772..befe626 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 */
-- 
1.7.7.2



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to