From: Takashi Iwai <tiwai@suse.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Struan Bartlett <struan.bartlett@gmail.com>,
Andreas Schwab <schwab@linux-m68k.org>,
Jean Delvare <jdelvare@suse.de>,
gnomes@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] ttyprintk: Fix wrong tty_unregister_driver() call in the error path
Date: Wed, 2 Apr 2014 14:45:21 +0200 [thread overview]
Message-ID: <1396442722-26346-1-git-send-email-tiwai@suse.de> (raw)
ttyprintk driver calls tty_unregister_driver() wrongly in the error
path of tty_register_driver(). Also, setting ttyprintk_driver to NULL
is utterly superfluous, so let's get rid of it, too.
Reported-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
v1->v2: add review tag
drivers/char/ttyprintk.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c
index daea84c41743..2a39c5790364 100644
--- a/drivers/char/ttyprintk.c
+++ b/drivers/char/ttyprintk.c
@@ -210,10 +210,8 @@ static int __init ttyprintk_init(void)
return 0;
error:
- tty_unregister_driver(ttyprintk_driver);
put_tty_driver(ttyprintk_driver);
tty_port_destroy(&tpk_port.port);
- ttyprintk_driver = NULL;
return ret;
}
device_initcall(ttyprintk_init);
--
1.9.1
next reply other threads:[~2014-04-02 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 12:45 Takashi Iwai [this message]
2014-04-02 12:45 ` [PATCH v2 2/2] ttyprintk: Allow built as a module Takashi Iwai
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=1396442722-26346-1-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=arnd@arndb.de \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jdelvare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@linux-m68k.org \
--cc=struan.bartlett@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®