|
@@ -1795,12 +1795,15 @@ retry_open:
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
if (device == MKDEV(TTYAUX_MAJOR, 1)) {
|
|
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);
|
|
mutex_unlock(&tty_mutex);
|
|
return -ENODEV;
|
|
return -ENODEV;
|