This is a note to let you know that I've just added the patch titled

    media: staging: lirc_serial: Do not assume error codes returned by 
request_irq()

to the 3.2-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
media-staging-lirc_serial-do-not-assume-error-codes-returned-by-request_irq.patch
and it can be found in the queue-3.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From affc9a0d59ac49bd304e2137bd5e4ffdd6fdfa52 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Wed, 16 Nov 2011 01:54:04 -0300
Subject: media: staging: lirc_serial: Do not assume error codes returned by 
request_irq()

From: Ben Hutchings <[email protected]>

commit affc9a0d59ac49bd304e2137bd5e4ffdd6fdfa52 upstream.

lirc_serial_probe() must fail if request_irq() returns an error, even if
it isn't EBUSY or EINVAL,

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Jonathan Nieder <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/staging/media/lirc/lirc_serial.c |   21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -843,18 +843,15 @@ static int __devinit lirc_serial_probe(s
        result = request_irq(irq, irq_handler,
                             (share_irq ? IRQF_SHARED : 0),
                             LIRC_DRIVER_NAME, (void *)&hardware);
-
-       switch (result) {
-       case -EBUSY:
-               printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq);
-               return -EBUSY;
-       case -EINVAL:
-               printk(KERN_ERR LIRC_DRIVER_NAME
-                      ": Bad irq number or handler\n");
-               return -EINVAL;
-       default:
-               break;
-       };
+       if (result < 0) {
+               if (result == -EBUSY)
+                       printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n",
+                              irq);
+               else if (result == -EINVAL)
+                       printk(KERN_ERR LIRC_DRIVER_NAME
+                              ": Bad irq number or handler\n");
+               return result;
+       }
 
        /* Reserve io region. */
        /*


Patches currently in stable-queue which might be from [email protected] are

queue-3.2/media-staging-lirc_serial-do-not-assume-error-codes-returned-by-request_irq.patch
queue-3.2/media-staging-lirc_serial-fix-deadlock-on-resume-failure.patch
queue-3.2/media-staging-lirc_serial-free-resources-on-failure-paths-of-lirc_serial_probe.patch
queue-3.2/media-staging-lirc_serial-fix-init-exit-order.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to