summaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorGerhard Bertelsmann <info@gerhard-bertelsmann.de>2015-09-25 18:58:38 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-10-13 17:42:33 +0200
commit887e07be3fd2d056362a9f851f796580d7bca499 (patch)
treef087716b706955c439ac535246f55b42ccf64d1b /drivers/net/can
parentMerge branch 'bridge-vlan' (diff)
downloadlinux-887e07be3fd2d056362a9f851f796580d7bca499.tar.xz
linux-887e07be3fd2d056362a9f851f796580d7bca499.zip
can: sun4i: fix arbitration lost error reporting
This patch fixes a bug in arbitration error reporting Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Gerhard Bertelsmann <info@gerhard-bertelsmann.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/sun4i_can.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
index 10d8497635e8..67bdf6d62c76 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;
}
}