diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-02 15:23:42 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-02 15:23:42 +0200 |
commit | d61e87ac53292a3138b4354b687558973686b6ca (patch) | |
tree | 0bd2a0dc313bea46119fee336a2ea476e05b22ee | |
parent | 9ffecb10283508260936b96022d4ee43a7798b4c (diff) | |
parent | 6d3cbfa718eeedd70efb9eb04ce9b261b6fa5b7b (diff) | |
download | linux-d61e87ac53292a3138b4354b687558973686b6ca.tar.bz2 |
Merge tag 'pull_req_4.3_rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq
Pull devfreq fixes for v4.3-rc5 from MyungJoo Ham.
* tag 'pull_req_4.3_rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq:
PM / devfreq: fix double kfree
PM / devfreq: Fix governor_store()
-rw-r--r-- | drivers/devfreq/devfreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 3927ed9fdbd5..ca848cc6a8fd 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -492,7 +492,7 @@ struct devfreq *devfreq_add_device(struct device *dev, if (err) { put_device(&devfreq->dev); mutex_unlock(&devfreq->lock); - goto err_dev; + goto err_out; } mutex_unlock(&devfreq->lock); @@ -518,7 +518,6 @@ struct devfreq *devfreq_add_device(struct device *dev, err_init: list_del(&devfreq->node); device_unregister(&devfreq->dev); -err_dev: kfree(devfreq); err_out: return ERR_PTR(err); @@ -795,8 +794,10 @@ static ssize_t governor_store(struct device *dev, struct device_attribute *attr, ret = PTR_ERR(governor); goto out; } - if (df->governor == governor) + if (df->governor == governor) { + ret = 0; goto out; + } if (df->governor) { ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); |