BigW Consortium Gitlab

Commit 207b2906 by David Clark

Fixed bug checking if UART closed in write function

parent b572f32d
......@@ -331,8 +331,9 @@ size_t mt7697_uart_write(void *arg, const u32 *buf, size_t len)
oldfs = get_fs();
set_fs(get_ds());
if (!uart_info->fd_hndl) {
dev_err(uart_info->dev, "%s(): device closed\n", __func__);
if (uart_info->fd_hndl == MT7697_UART_INVALID_FD ||
IS_ERR(uart_info->fd_hndl)) {
dev_warn(uart_info->dev, "%s(): device closed\n", __func__);
goto cleanup;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment