can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error
authorFrank Jungclaus <frank.jungclaus@esd.eu>
Thu, 16 Feb 2023 19:04:48 +0000 (20:04 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 16 Feb 2023 19:59:47 +0000 (20:59 +0100)
commit118469f88180438ef43dee93d71f77c00e7b425d
tree68147ae993c53a731c8b1e12b964f77c6cb91698
parent470ac62dfa5732c149adce2cbce84ac678de701f
can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error

Move the supply for cf->data[3] (bit stream position of CAN error), in
case of a bus- or protocol-error, outside of the "switch (ecc &
SJA1000_ECC_MASK){}"-statement, because this bit stream position is
independent of the error type.

Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Signed-off-by: Frank Jungclaus <frank.jungclaus@esd.eu>
Link: https://lore.kernel.org/all/20230216190450.3901254-2-frank.jungclaus@esd.eu
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/esd_usb.c