diff mbox

PM / devfreq: remove double put_device

Message ID 531029804.743801463366821536.JavaMail.weblogic@ep2mlwas03c (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

MyungJoo Ham May 16, 2016, 2:47 a.m. UTC
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>

---
 drivers/devfreq/devfreq.c | 1 -
 1 file changed, 1 deletion(-)

-- 
1.9.1
diff mbox

Patch

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 4f6079e..5200728 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -528,7 +528,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;
 	}