diff mbox series

[v1,04/19] hid-ft260: remove dead code in ft260_uart_receive_chars

Message ID 20240210215147.77629-5-michael.zaidman@gmail.com (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series hid-ft260: Fixes for serial driver patch v4 | expand

Commit Message

Michael Zaidman Feb. 10, 2024, 9:51 p.m. UTC
Remove conditional expression, which will never be true here since
it is already filtered in the ft260_raw_event procedure.

Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com>
---
 drivers/hid/hid-ft260.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index a348f11600c6..77638cae595e 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1202,16 +1202,11 @@  static int ft260_uart_receive_chars(struct ft260_device *port,
 				    u8 *data, u8 length)
 {
 	struct hid_device *hdev = port->hdev;
-	int ret = 0;
-
-	if (length > FT260_RD_DATA_MAX) {
-		hid_err(hdev, "Received too much data (%d)\n", length);
-		return -EBADR;
-	}
+	int ret;
 
 	ret = tty_insert_flip_string(&port->port, data, length);
 	if (ret != length)
-		hid_err(hdev, "%d char not inserted to flip buffer\n", length - ret);
+		hid_dbg(hdev, "%d char not inserted to flip buffer\n", length - ret);
 	port->icount.rx += ret;
 
 	if (ret)