From: Ben Hutchings Date: Wed, 16 Nov 2011 04:53:25 +0000 (-0300) Subject: [media] staging: lirc_serial: Fix deadlock on resume failure X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1ff1d88e862948ae5bfe490248c023ff8ac2855d;p=linux-beck.git [media] staging: lirc_serial: Fix deadlock on resume failure A resume function cannot remove the device it is resuming! Signed-off-by: Ben Hutchings Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c index d833772ef806..befe6267d7cb 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 */