cpufreq: imx6q: Fix error handling code
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 9 Apr 2017 07:33:52 +0000 (09:33 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Apr 2017 21:22:01 +0000 (23:22 +0200)
According to the previous error handling code, it is likely that
'goto out_free_opp' is expected here in order to avoid a memory leak in
error handling path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/imx6q-cpufreq.c

index 786122e0455ec9381c89268222f08ee5ada57dca..9c13f097fd8c9a96adba12cccc8e7eda523a57e3 100644 (file)
@@ -268,7 +268,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
        ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
        if (ret) {
                dev_err(cpu_dev, "failed to init cpufreq table: %d\n", ret);
-               goto put_reg;
+               goto out_free_opp;
        }
 
        /* Make imx6_soc_volt array's size same as arm opp number */