Commit 180bc55f authored by Russell King's avatar Russell King

[SERIAL] Stop open() looping while opening a non-present port

Trying to open a non-present port (for configuration) causes us to
to endlessly loop (by returning -ERESTARTSYS).  We should be returning
success.  This cset fixes this.
parent 2e113f39
......@@ -1450,6 +1450,9 @@ uart_block_til_ready(struct file *filp, struct uart_info *info)
if (signal_pending(current))
return -ERESTARTSYS;
if (info->tty->flags & (1 << TTY_IO_ERROR))
return 0;
if (tty_hung_up_p(filp) || !(info->flags & UIF_INITIALIZED))
return (port->flags & UPF_HUP_NOTIFY) ?
-EAGAIN : -ERESTARTSYS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment