summaryrefslogtreecommitdiff
path: root/drivers/net/can/sja1000/sja1000.c
diff options
context:
space:
mode:
authorOliver Hartkopp <socketcan@hartkopp.net>2015-11-21 20:41:21 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-11-23 11:37:38 +0300
commita2ec19f888f1fb06e2424486423a16f86ad1fcc4 (patch)
treec1644eda37c31376d5ed54b453d2d605cc357c46 /drivers/net/can/sja1000/sja1000.c
parentffd461f80d536336811d573f197f3e6d9872d054 (diff)
downloadlinux-a2ec19f888f1fb06e2424486423a16f86ad1fcc4.tar.xz
can: remove obsolete assignment for CAN protocol error type
The assignment 'cf->data[2] |= CAN_ERR_PROT_UNSPEC' used at CAN error message creation time is obsolete as CAN_ERR_PROT_UNSPEC is zero and cf->data[2] is initialized with zero in alloc_can_err_skb() anyway. So we could either assign 'cf->data[2] = CAN_ERR_PROT_UNSPEC' correctly or we can remove the obsolete OR operation entirely. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/sja1000/sja1000.c')
-rw-r--r--drivers/net/can/sja1000/sja1000.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index f10834be48a5..8dda3b703d39 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -449,7 +449,6 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
cf->data[2] |= CAN_ERR_PROT_STUFF;
break;
default:
- cf->data[2] |= CAN_ERR_PROT_UNSPEC;
cf->data[3] = ecc & ECC_SEG;
break;
}