Thread (74 messages) 74 messages, 2 authors, 2012-03-12

[ 56/68] media: staging: lirc_serial: Fix deadlock on resume failure

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2012-03-09 19:59:48
Also in: lkml

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ben Hutchings <redacted>

commit 1ff1d88e862948ae5bfe490248c023ff8ac2855d upstream.

A resume function cannot remove the device it is resuming!

Signed-off-by: Ben Hutchings <redacted>
Signed-off-by: Mauro Carvalho Chehab <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 drivers/staging/lirc/lirc_serial.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/staging/lirc/lirc_serial.c
+++ b/drivers/staging/lirc/lirc_serial.c
@@ -1127,10 +1127,8 @@ static int lirc_serial_resume(struct pla
 {
 	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 */

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help