]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: flexcan: flexcan_chip_stop(): add error handling and propagate error value
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 22 Sep 2020 14:44:19 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Oct 2020 09:38:30 +0000 (10:38 +0100)
commit03e738d32d460089f4f22512bc2166d5c2943862
treef7954ae03dd1b370ab3be65babd3d8796ba8943f
parent5ba7cf36d6ab1420efe9005ca2ef5ef43511a5fd
can: flexcan: flexcan_chip_stop(): add error handling and propagate error value

[ Upstream commit 9ad02c7f4f279504bdd38ab706fdc97d5f2b2a9c ]

This patch implements error handling and propagates the error value of
flexcan_chip_stop(). This function will be called from flexcan_suspend()
in an upcoming patch in some SoCs which support LPSR mode.

Add a new function flexcan_chip_stop_disable_on_error() that tries to
disable the chip even in case of errors.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
[mkl: introduce flexcan_chip_stop_disable_on_error() and use it in flexcan_close()]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20200922144429.2613631-11-mkl@pengutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/flexcan.c