diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
| commit | fd10902797fc9d6abaf55d9c2e3c6698c90b10c7 (patch) | |
| tree | 0bc15b8b967e6f0973387e7c81f5b0dc9ce44e75 /drivers/char/tty_io.c | |
| parent | 5b3eec0c80038c8739ccd465b897a35c0dff1cc4 (diff) | |
| parent | 8b1fae4e4200388b64dd88065639413cb3f1051c (diff) | |
Merge commit 'v2.6.28-rc8' into x86/irq
Diffstat (limited to 'drivers/char/tty_io.c')
| -rw-r--r-- | drivers/char/tty_io.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 59f472143f08..1412a8d1e58d 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1795,12 +1795,15 @@ retry_open: } #endif if (device == MKDEV(TTYAUX_MAJOR, 1)) { - driver = tty_driver_kref_get(console_device(&index)); - if (driver) { - /* Don't let /dev/console block */ - filp->f_flags |= O_NONBLOCK; - noctty = 1; - goto got_driver; + struct tty_driver *console_driver = console_device(&index); + if (console_driver) { + driver = tty_driver_kref_get(console_driver); + if (driver) { + /* Don't let /dev/console block */ + filp->f_flags |= O_NONBLOCK; + noctty = 1; + goto got_driver; + } } mutex_unlock(&tty_mutex); return -ENODEV; |
