can: fix assignment of error location in CAN error messages
authorOliver Hartkopp <socketcan@hartkopp.net>
Sat, 21 Nov 2015 17:41:20 +0000 (18:41 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 23 Nov 2015 08:37:34 +0000 (09:37 +0100)
commitffd461f80d536336811d573f197f3e6d9872d054
tree2bbab4a1de8d6f21b063f85648ddf68a6d21f88c
parent7cecd9ab80f43972c056dc068338f7bcc407b71c
can: fix assignment of error location in CAN error messages

As Dan Carpenter reported in http://marc.info/?l=linux-can&m=144793696016187
the assignment of the error location in CAN error messages had some bit wise
overlaps. Indeed the value to be assigned in data[3] is no bitfield but defines
a single value which points to a location inside the CAN frame on the wire.

This patch fixes the assignments for the error locations in error messages.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c
drivers/net/can/cc770/cc770.c
drivers/net/can/flexcan.c
drivers/net/can/m_can/m_can.c
drivers/net/can/pch_can.c
drivers/net/can/rcar_can.c
drivers/net/can/ti_hecc.c
drivers/net/can/usb/kvaser_usb.c
drivers/net/can/usb/usb_8dev.c
drivers/net/can/xilinx_can.c