Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533210
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() |
| Date | 2016-11-30 11:50 +0100 |
| Message-ID | <sJaCC-4Za-31@gated-at.bofh.it> (permalink) |
| References | <sJ4nv-12s-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 30-11-16, 09:29, Viresh Kumar wrote:
> +struct opp_table *dev_pm_opp_set_regulator(struct device *dev, const char *name)
> {
> struct opp_table *opp_table;
> struct regulator *reg;
> - int ret;
>
> mutex_lock(&opp_table_lock);
>
> opp_table = _add_opp_table(dev);
> if (!opp_table) {
> - ret = -ENOMEM;
> + opp_table = ERR_PTR(-ENOMEM);
> goto unlock;
> }
>
> /* This should be called before OPPs are initialized */
> if (WARN_ON(!list_empty(&opp_table->opp_list))) {
> - ret = -EBUSY;
> + opp_table = ERR_PTR(-EBUSY);
The pointer opp_table shouldn't be overwritten here as it will be used
in the error path. Will resend the patch shortly.
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-30 05:10 +0100
Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Joonyoung Shim <jy0922.shim@samsung.com> - 2016-11-30 07:20 +0100
Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-30 09:10 +0100
Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Joonyoung Shim <jy0922.shim@samsung.com> - 2016-12-01 02:50 +0100
Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-12-01 04:30 +0100
Re: [PATCH V4] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-30 11:50 +0100
[PATCH V5] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-11-30 12:00 +0100
Re: [PATCH V5] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Stephen Boyd <sboyd@codeaurora.org> - 2016-11-30 23:10 +0100
Re: [PATCH V5] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2016-12-01 01:30 +0100
Re: [PATCH V5] PM / OPP: Pass opp_table to dev_pm_opp_put_regulator() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-12-01 15:40 +0100
csiph-web