summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRam Gupta <ram.gupta5@gmail.com>2006-08-15 08:05:29 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-10-01 18:07:00 +0200
commit80e3c2b659515ef236f33f691ff5b22ae90ae8e4 (patch)
tree22a703b601180dde953f0547b2660cbac1db76ec
parent[SERIAL] Make uart_line_info() correctly tell MMIO from I/O port (diff)
downloadlinux-80e3c2b659515ef236f33f691ff5b22ae90ae8e4.tar.xz
linux-80e3c2b659515ef236f33f691ff5b22ae90ae8e4.zip
[SERIAL] returning proper error from serial core driver
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>
-rw-r--r--drivers/serial/serial_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index d7e28ab4c313..d814bb1dcb05 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -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
}
}