cpufreq: imx6q: fix error handling
authorPeng Fan <peng.fan@nxp.com>
Tue, 3 Mar 2020 02:14:49 +0000 (10:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:03 +0000 (10:50 +0200)
commitf6bb3ea812f03f373266fee117d4e4640febf5ef
tree171787ad1210eac1a44817ba633aaf3322ced0b7
parentc5bcaacd06407b10d0983f33c2d744ecb1fcbdf1
cpufreq: imx6q: fix error handling

[ Upstream commit 3646f50a3838c5949a89ecbdb868497cdc05b8fd ]

When speed checking failed, direclty jumping to put_node label
is not correct. Need jump to out_free_opp to avoid resources leak.

Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/imx6q-cpufreq.c