aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/tty_mutex.c')
-rw-r--r--drivers/tty/tty_mutex.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c
index 2640635ee177..784e46a0a3b1 100644
--- a/drivers/tty/tty_mutex.c
+++ b/drivers/tty/tty_mutex.c
@@ -4,6 +4,7 @@
#include <linux/kallsyms.h>
#include <linux/semaphore.h>
#include <linux/sched.h>
+#include "tty.h"
/* Legacy tty mutex glue */
@@ -13,8 +14,6 @@
void tty_lock(struct tty_struct *tty)
{
- if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
- return;
tty_kref_get(tty);
mutex_lock(&tty->legacy_mutex);
}
@@ -24,8 +23,6 @@ int tty_lock_interruptible(struct tty_struct *tty)
{
int ret;
- if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
- return -EIO;
tty_kref_get(tty);
ret = mutex_lock_interruptible(&tty->legacy_mutex);
if (ret)
@@ -35,8 +32,6 @@ int tty_lock_interruptible(struct tty_struct *tty)
void tty_unlock(struct tty_struct *tty)
{
- if (WARN(tty->magic != TTY_MAGIC, "U Bad %p\n", tty))
- return;
mutex_unlock(&tty->legacy_mutex);
tty_kref_put(tty);
}