]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: imx: imx8mq: correct error handling path
authorPeng Fan <peng.fan@nxp.com>
Sun, 1 Oct 2023 12:26:18 +0000 (20:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:17 +0000 (11:08 +0100)
commit7d416973cd12d1132c21ae8b32df52a8d3b3c56a
treecfc7851ab7936a87cfd6c603a112af5fd7d47d1f
parent608ebb098b79391ce8ac7bd67cb1e9de8364736a
clk: imx: imx8mq: correct error handling path

[ Upstream commit 577ad169966e6e75b10e004389a3f79813e84b5d ]

Avoid memory leak in error handling path. It does not make
much sense for the SoC without clk driver, to make program behavior
correct, let's fix it.

Fixes: b80522040cd3 ("clk: imx: Add clock driver for i.MX8MQ CCM")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202309240551.e46NllPa-lkp@intel.com/
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20231001122618.194498-1-peng.fan@oss.nxp.com
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/imx/clk-imx8mq.c