浏览代码

[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>
Ram Gupta 19 年之前
父节点
当前提交
80e3c2b659
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/serial/serial_core.c

+ 1 - 0
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
 		}
 	}