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>
This commit is contained in:
MyungJoo Ham 2016-05-16 11:41:57 +09:00
parent a5e9b937fa
commit 67ffdb529b
1 changed files with 0 additions and 1 deletions

View File

@ -564,7 +564,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
dev_set_name(&devfreq->dev, "%s", dev_name(dev));
err = device_register(&devfreq->dev);
if (err) {
put_device(&devfreq->dev);
mutex_unlock(&devfreq->lock);
goto err_out;
}