public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ttyprintk: Fix wrong tty_unregister_driver() call in the error path
@ 2014-04-02 10:29 Takashi Iwai
  2014-04-02 10:29 ` [PATCH 2/2] ttyprintk: Allow built as a module Takashi Iwai
  2014-04-02 12:24 ` [PATCH 1/2] ttyprintk: Fix wrong tty_unregister_driver() call in the error path Jean Delvare
  0 siblings, 2 replies; 10+ messages in thread
From: Takashi Iwai @ 2014-04-02 10:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg Kroah-Hartman, Jean Delvare, Struan Bartlett, Andreas Schwab,
	gnomes, linux-kernel

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-04-05 11:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 10:29 [PATCH 1/2] ttyprintk: Fix wrong tty_unregister_driver() call in the error path Takashi Iwai
2014-04-02 10:29 ` [PATCH 2/2] ttyprintk: Allow built as a module Takashi Iwai
2014-04-02 12:31   ` Jean Delvare
2014-04-02 12:42     ` Takashi Iwai
2014-04-02 19:32   ` Greg Kroah-Hartman
2014-04-03  6:13     ` Takashi Iwai
2014-04-05 11:15       ` Samo Pogačnik
2014-04-02 12:24 ` [PATCH 1/2] ttyprintk: Fix wrong tty_unregister_driver() call in the error path Jean Delvare
2014-04-03  6:10   ` Takashi Iwai
2014-04-03  8:00     ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox