sparc: serial: sunhv: fix a double lock bug
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Jul 2016 11:17:33 +0000 (14:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Jul 2016 05:54:52 +0000 (22:54 -0700)
We accidentally take the "port->lock" twice in a row.  This old code
was supposed to be deleted.

Fixes: e58e241c1788 ('sparc: serial: Clean up the locking for -rt')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/tty/serial/sunhv.c

index ca0d3802f2af45fb8be9cad11d9763fb615e516a..4e603d060e80c91b36aabb3961dc22c3596d37ec 100644 (file)
@@ -490,12 +490,6 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig
                locked = spin_trylock_irqsave(&port->lock, flags);
        else
                spin_lock_irqsave(&port->lock, flags);
-       if (port->sysrq) {
-               locked = 0;
-       } else if (oops_in_progress) {
-               locked = spin_trylock(&port->lock);
-       } else
-               spin_lock(&port->lock);
 
        for (i = 0; i < n; i++) {
                if (*s == '\n')