From: "Ram Gupta" 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 Cc: Russell King Signed-off-by: Andrew Morton --- drivers/serial/serial_core.c | 1 + 1 file changed, 1 insertion(+) diff -puN drivers/serial/serial_core.c~drivers-returning-proper-error-from-serial-driver drivers/serial/serial_core.c --- a/drivers/serial/serial_core.c~drivers-returning-proper-error-from-serial-driver +++ a/drivers/serial/serial_core.c @@ -792,6 +792,7 @@ static int uart_set_info(struct uart_sta * We failed anyway. */ retval = -EBUSY; + goto exit; // Added to return the correct error -Ram Gupta } } _