[PATCH 2/5] drivers/serial: imx: fix locking imbalance upon -EBADF

Philippe Gerum rpm at xenomai.org
Wed Mar 20 16:44:22 CET 2019


Signed-off-by: Philippe Gerum <rpm at xenomai.org>
---
 kernel/drivers/serial/rt_imx_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/drivers/serial/rt_imx_uart.c b/kernel/drivers/serial/rt_imx_uart.c
index 443a34261..574fd1aa7 100644
--- a/kernel/drivers/serial/rt_imx_uart.c
+++ b/kernel/drivers/serial/rt_imx_uart.c
@@ -1433,7 +1433,7 @@ static ssize_t rt_imx_uart_write(struct rtdm_fd *fd, const void *buf,
 				/* Device has been closed -
 				 * return immediately.
 				 */
-				return -EBADF;
+				ret = -EBADF;
 			}
 			if (ret == -EWOULDBLOCK) {
 				/* Fix error code for non-blocking mode. */
-- 
2.20.1




More information about the Xenomai mailing list