A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <[email protected]>
---
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



_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to