diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2011-11-16 01:53:25 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-12 10:33:00 -0700 |
commit | c421942a2c438d3d111222d78704f254ce5201d4 (patch) | |
tree | 53a58cffea929beeec4aeb24bdca5b62aa102ec9 | |
parent | 9971532b094729a08175715fef295cd41d0f7ea7 (diff) | |
download | lwn-c421942a2c438d3d111222d78704f254ce5201d4.tar.gz lwn-c421942a2c438d3d111222d78704f254ce5201d4.zip |
media: staging: lirc_serial: Fix deadlock on resume failure
commit 1ff1d88e862948ae5bfe490248c023ff8ac2855d upstream.
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>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lirc/lirc_serial.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/lirc/lirc_serial.c b/drivers/staging/lirc/lirc_serial.c index fa023da6bdaa..4b8fefb954d3 100644 --- a/drivers/staging/lirc/lirc_serial.c +++ b/drivers/staging/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 */ |