[PATCH 4/4] cpufreq: mt8173: move resources allocation into ->probe()

Viresh Kumar viresh.kumar at linaro.org
Sun Nov 29 21:32:06 PST 2015


On 30-11-15, 11:02, Ricky Liang wrote:
> On Sun, Nov 29, 2015 at 4:31 PM, Pi-Cheng Chen <pi-cheng.chen at linaro.org> wrote:
> >         ret = cpufreq_register_driver(&mt8173_cpufreq_driver);
> >         if (ret)
> >                 pr_err("failed to register mtk cpufreq driver\n");
> 
> I think you want "return ret;" inside the if block.

Not just that, he needs to jump to release_dvfs_info_list.

> >
> > +       return 0;
> > +
> > +release_dvfs_info_list:
> > +       list_for_each_safe(list, tmp, &dvfs_info_list) {
> > +               info = list_entry(list, struct mtk_cpu_dvfs_info, list_head);
> > +
> > +               mtk_cpu_dvfs_info_release(info);
> > +               list_del(list);
> > +               kfree(info);
> > +       }
> > +
> >         return ret;
> >  }

-- 
viresh



More information about the Linux-mediatek mailing list