diff options
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/rave-sp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index b70416050a81..cb0cc9d509a0 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c @@ -546,8 +546,6 @@ static int rave_sp_receive_buf(struct serdev_device *serdev, /* FALLTHROUGH */ case RAVE_SP_EXPECT_ESCAPED_DATA: - deframer->data[deframer->length++] = byte; - if (deframer->length == sizeof(deframer->data)) { dev_warn(dev, "Bad frame: Too long\n"); /* @@ -562,6 +560,8 @@ static int rave_sp_receive_buf(struct serdev_device *serdev, goto reset_framer; } + deframer->data[deframer->length++] = byte; + /* * We've extracted out special byte, now we * can go back to regular data collecting |