]> git.baikalelectronics.ru Git - kernel.git/commit
can: flex_can: Correct the checking for frame length in flexcan_start_xmit()
authorLuu An Phu <phu.luuan@nxp.com>
Tue, 2 Jan 2018 03:44:18 +0000 (10:44 +0700)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 4 Jan 2018 15:14:38 +0000 (16:14 +0100)
commitd4806e8a61f3708623967d2b10cb70625d1796d1
treed848eeb277470e3841c7c394cd4f060a92eb2fbb
parent1faae8f504453089fbe5116cf7db0b6d44da4374
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