aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/devfreq.c
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2016-05-15 22:41:57 -0400
committerMyungJoo Ham <myungjoo.ham@samsung.com>2016-06-22 00:52:52 -0400
commit67ffdb529b4ec9833f73947dec01eaa78dd53c3d (patch)
tree341a322ef9d27c165598fa62113a8eae5bdf3242 /drivers/devfreq/devfreq.c
parenta5e9b937fa91b3f404618b5281c3239bd1f09c7b (diff)
PM / devfreq: remove double put_device
When device_register() returns with error, it has already done put_device() on the input device pointer. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq/devfreq.c')
-rw-r--r--drivers/devfreq/devfreq.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 3e1afb4ac77c..0ebd64dfc0a9 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -564,7 +564,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
564 dev_set_name(&devfreq->dev, "%s", dev_name(dev)); 564 dev_set_name(&devfreq->dev, "%s", dev_name(dev));
565 err = device_register(&devfreq->dev); 565 err = device_register(&devfreq->dev);
566 if (err) { 566 if (err) {
567 put_device(&devfreq->dev);
568 mutex_unlock(&devfreq->lock); 567 mutex_unlock(&devfreq->lock);
569 goto err_out; 568 goto err_out;
570 } 569 }