From: Andi Kleen <ak@suse.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] Don't panic the kernel when cyclades tty
Date: Sun, 11 Feb 2007 13:57:53 +0000 [thread overview]
Message-ID: <200702111457.54085.ak@suse.de> (raw)
I noticed this while grepping for something. There is no reason to panic
the kernel when a tty driver cannot be initialized.
Just error out in this case, no need to panic.
BTW there seem to be more bogus panics in a few drivers. Perhaps that
would be a fruitful target for some janitor activity (mailing list cc'ed)
Signed-off-by: Andi Kleen <ak@suse.de
Index: linux-2.6.20-git6-hack/drivers/char/cyclades.c
=================================--- linux-2.6.20-git6-hack.orig/drivers/char/cyclades.c
+++ linux-2.6.20-git6-hack/drivers/char/cyclades.c
@@ -5346,8 +5346,11 @@ static int __init cy_init(void)
cy_serial_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(cy_serial_driver, &cy_ops);
- if (tty_register_driver(cy_serial_driver))
- panic("Couldn't register Cyclades serial driver\n");
+ if (tty_register_driver(cy_serial_driver)) {
+ printk(KERN_ERR "Couldn't register Cyclades serial driver\n");
+ put_tty_driver(cy_serial_driver);
+ return -EIO;
+ }
for (i = 0; i < NR_CARDS; i++) {
/* base_addr=0 indicates board not found */
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
reply other threads:[~2007-02-11 13:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200702111457.54085.ak@suse.de \
--to=ak@suse.de \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.