Skip to content

Commit

Permalink
[SERIAL] returning proper error from serial core driver
Browse files Browse the repository at this point in the history
Fix the issue of returning 0 even in case of error from uart_set_info
function.  Now it returns the error EBUSY when it can not set new port.

Signed-off-by: Ram Gupta <r.gupta@astronautics.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Ram Gupta authored and Russell King committed Oct 1, 2006
1 parent 6c6a233 commit 80e3c2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ static int uart_set_info(struct uart_state *state,
* We failed anyway.
*/
retval = -EBUSY;
goto exit; // Added to return the correct error -Ram Gupta
}
}

Expand Down

0 comments on commit 80e3c2b

Please sign in to comment.