summaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_core.c
diff options
context:
space:
mode:
authorRam Gupta2006-08-15 08:05:29 +0200
committerRussell King2006-10-01 18:07:00 +0200
commit80e3c2b659515ef236f33f691ff5b22ae90ae8e4 (patch)
tree22a703b601180dde953f0547b2660cbac1db76ec /drivers/serial/serial_core.c
parent[SERIAL] Make uart_line_info() correctly tell MMIO from I/O port (diff)
downloadkernel-qcow2-linux-80e3c2b659515ef236f33f691ff5b22ae90ae8e4.tar.gz
kernel-qcow2-linux-80e3c2b659515ef236f33f691ff5b22ae90ae8e4.tar.xz
kernel-qcow2-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>
Diffstat (limited to 'drivers/serial/serial_core.c')
-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
}
}