]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: m_can: m_can_handle_state_change(): fix state change
authorWu Bo <wubo.oduw@gmail.com>
Wed, 29 Jan 2020 02:23:30 +0000 (10:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:29:07 +0000 (13:29 +0100)
commit9b0596c07da8cdfd4979c0e342bbcb19fbe74de0
tree6de2df33edffd3d9f4d51ffc3fe7dd9413a4f6ab
parent69851481b342b274db1084299e29022d63431fc4
can: m_can: m_can_handle_state_change(): fix state change

[ Upstream commit cd0d83eab2e0c26fe87a10debfedbb23901853c1 ]

m_can_handle_state_change() is called with the new_state as an argument.

In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the
following code indicate that a CAN_STATE_ERROR_WARNING is handled.

This patch fixes this problem by changing the case to CAN_STATE_ERROR_WARNING.

Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
Link: http://lore.kernel.org/r/20200129022330.21248-2-wubo.oduw@gmail.com
Cc: Dan Murphy <dmurphy@ti.com>
Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/m_can/m_can.c