Skip to content
Commit dcc9cd5d authored by Francesco Dolcini's avatar Francesco Dolcini Committed by Greg Kroah-Hartman
Browse files

Bluetooth: btmtkuart: fix recv_buf() return value

[ Upstream commit 64057f05 ]

Serdev recv_buf() callback is supposed to return the amount of bytes
consumed, therefore an int in between 0 and count.

Do not return negative number in case of issue, just print an error and
return count. This fixes a WARN in ttyport_receive_buf().

Link: https://lore.kernel.org/all/087be419-ec6b-47ad-851a-5e1e3ea5cfcc@kernel.org/
Fixes: 7237c4c9

 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: default avatarFrancesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent efcfcd5f
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