The patch titled
     dz: don't panic() when request_irq() fails
has been added to the -mm tree.  Its filename is
     dz-dont-panic-when-request_irq-fails.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: dz: don't panic() when request_irq() fails
From: "Maciej W. Rozycki" <[EMAIL PROTECTED]>

Well, panic() is a little bit undue if request_irq() fails; there is probably
no need to justify it any further.  Handle the case gracefully, by
unregistering the driver.

Signed-off-by: Maciej W. Rozycki <[EMAIL PROTECTED]>
Cc: Jiri Slaby <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/serial/dz.c |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff -puN drivers/serial/dz.c~dz-dont-panic-when-request_irq-fails 
drivers/serial/dz.c
--- a/drivers/serial/dz.c~dz-dont-panic-when-request_irq-fails
+++ a/drivers/serial/dz.c
@@ -794,18 +794,28 @@ static int __init dz_init(void)
        dz_reset(&dz_ports[0]);
 #endif
 
-       if (request_irq(dz_ports[0].port.irq, dz_interrupt,
-                       IRQF_DISABLED, "DZ", &dz_ports[0]))
-               panic("Unable to register DZ interrupt");
-
        ret = uart_register_driver(&dz_reg);
        if (ret != 0)
-               return ret;
+               goto out;
+
+       ret = request_irq(dz_ports[0].port.irq, dz_interrupt, IRQF_DISABLED,
+                         "DZ", &dz_ports[0]);
+       if (ret != 0) {
+               printk(KERN_ERR "dz: Cannot get IRQ %d!\n",
+                      dz_ports[0].port.irq);
+               goto out_unregister;
+       }
 
        for (i = 0; i < DZ_NB_PORT; i++)
                uart_add_one_port(&dz_reg, &dz_ports[i].port);
 
        return ret;
+
+out_unregister:
+       uart_unregister_driver(&dz_reg);
+
+out:
+       return ret;
 }
 
 module_init(dz_init);
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

origin.patch
kernel-printkc-concerns-about-the-console-handover.patch
dzh-remove-useless-unused-module-junk.patch
dz-always-check-if-it-is-safe-to-console_putchar.patch
dz-dont-panic-when-request_irq-fails.patch
dz-add-and-reorder-inclusions-remove-unneeded-ones.patch
dz-update-kconfig-description.patch
dz-rename-the-serial-console-structure.patch
dz-fix-locking-issues.patch
dz-handle-special-conditions-on-reception-correctly.patch
maintainers-add-self-for-the-dz-serial-driver.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to