can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path
authorDongliang Mu <dzm91@hust.edu.cn>
Mon, 24 Oct 2022 11:48:07 +0000 (19:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:59:17 +0000 (23:59 +0900)
commita3e09eff32d8b73ac04cf9e798d823d12839c188
treec91f4824d135c0d4bceed9cb69debee3f8c06100
parent304a10161696d86300ceab1cbe72b2d74b8cdd94
can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path

[ Upstream commit 3e5b3418827cefb5e1cc658806f02965791b8f07 ]

The commit 1149108e2fbf ("can: mscan: improve clock API use") only
adds put_clock() in mpc5xxx_can_remove() function, forgetting to add
put_clock() in the error handling code.

Fix this bug by adding put_clock() in the error handling code.

Fixes: 1149108e2fbf ("can: mscan: improve clock API use")
Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/all/20221024133828.35881-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/mscan/mpc5xxx_can.c