User: | Jiri Slaby |
Error type: | Leaving function in locked state |
Error type description: | Some lock is not unlocked on all paths of a function, so it is leaked |
File location: | drivers/char/generic_serial.c |
Line in file: | 593 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Undetermined 1
Stanse (1.2) |
Entered: | 2012-03-04 17:07:06 UTC |
563 spin_unlock_irqrestore(&port->driver_lock, flags); 564 565 /* close has no way of returning "EINTR", so discard return value */ 566 if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE) 567 gs_wait_tx_flushed (port, port->closing_wait); 568 569 port->port.flags &= ~GS_ACTIVE; 570 571 gs_flush_buffer(tty); 572 573 tty_ldisc_flush(tty); 574 tty->closing = 0; 575 576 port->event = 0; 577 port->rd->close (port); 578 port->rd->shutdown_port (port); 579 port->port.tty = NULL; 580 581 if (port->port.blocked_open) { 582 if (port->close_delay) { 583 spin_unlock_irqrestore(&port->driver_lock, flags); 584 msleep_interruptible(jiffies_to_msecs(port->close_delay)); 585 spin_lock_irqsave(&port->driver_lock, flags); 586 } 587 wake_up_interruptible(&port->port.open_wait); 588 } 589 port->port.flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING | ASYNC_INITIALIZED); 590 wake_up_interruptible(&port->port.close_wait); 591 592 func_exit (); 593} 594 595 596void gs_set_termios (struct tty_struct * tty, 597 struct ktermios * old_termios) 598{ 599 struct gs_port *port; 600 int baudrate, tmp, rv; 601 struct ktermios *tiosp; 602 603 func_enter();