OSDN Git Service

mfd: rave-sp: Check received frame length before accepting next byte
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Thu, 8 Mar 2018 17:37:56 +0000 (09:37 -0800)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 May 2018 08:21:48 +0000 (09:21 +0100)
commit5112cab38c76c28f973def1a9c8b881f2dc81a48
tree14614d5732dc5bb98972a859afd30823e88ae695
parent44564bc3d999cb1febfdb6750e2059d2b308ce00
mfd: rave-sp: Check received frame length before accepting next byte

Check received frame length _before_ accepting next byte in order to
avoid incorrectly rejecting payloads that are RAVE_SP_RX_BUFFER_SIZE
long.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rave-sp.c