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:
parent
a5e9b937fa
commit
67ffdb529b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue