can: flex_can: Correct the checking for frame length in flexcan_start_xmit()
commit13454c14550065fcc1705d6bd4ee6d40e057099f
authorLuu An Phu <phu.luuan@nxp.com>
Tue, 2 Jan 2018 03:44:18 +0000 (2 10:44 +0700)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 4 Jan 2018 15:14:38 +0000 (4 16:14 +0100)
treed848eeb277470e3841c7c394cd4f060a92eb2fbb
parentd5b42e6607661b198d8b26a0c30969605b1bf5c7
can: flex_can: Correct the checking for frame length in flexcan_start_xmit()

The flexcan_start_xmit() function compares the frame length with data
register length to write frame content into data[0] and data[1]
register. Data register length is 4 bytes and frame maximum length is 8
bytes.

Fix the check that compares frame length with 3. Because the register
length is 4.

Signed-off-by: Luu An Phu <phu.luuan@nxp.com>
Reviewed-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c