Skip to content

Commit 39259ac

Browse files
linosanfilippo-kunbusl1k
authored andcommitted
pibridge-serdev: change semantic of pibridge_req_io()
In function pibridge_req_io() do not return 0 in case of success but instead return the number of received bytes. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
1 parent 9b89ca2 commit 39259ac

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

drivers/tty/serdev/pibridge.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,14 +500,7 @@ int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf,
500500
return -EBADMSG;
501501
}
502502

503-
if (pkthdr.len < rcv_len) {
504-
dev_warn_ratelimited(&pibridge_s->serdev->dev,
505-
"received packet smaller than expected (size: %u, expected: %u)\n",
506-
pkthdr.len, rcv_len);
507-
return -EBADMSG;
508-
}
509-
510-
return 0;
503+
return to_receive;
511504
}
512505
EXPORT_SYMBOL(pibridge_req_io);
513506

0 commit comments

Comments
 (0)