From: Gerhard Bertelsmann Date: Fri, 25 Sep 2015 16:58:38 +0000 (+0200) Subject: can: sun4i: fix arbitration lost error reporting X-Git-Tag: v4.9.8~3303^2~134^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=887e07be3fd2d056362a9f851f796580d7bca499;p=platform%2Fkernel%2Flinux-rpi3.git can: sun4i: fix arbitration lost error reporting This patch fixes a bug in arbitration error reporting Reported-by: Dan Carpenter Signed-off-by: Gerhard Bertelsmann Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c index 10d8497..67bdf6d 100644 --- a/drivers/net/can/sun4i_can.c +++ b/drivers/net/can/sun4i_can.c @@ -601,7 +601,7 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status) stats->tx_errors++; if (likely(skb)) { cf->can_id |= CAN_ERR_LOSTARB; - cf->data[0] = (alc & 0x1f) >> 8; + cf->data[0] = (alc >> 8) & 0x1f; } }