Skip to contentSkip to conversation

PM / devfreq: remove double put_device

PATCH New MyungJoo Ham 1 participant 1 message May 16, 2016 Device frequency (devfreq)

lore
Share & tools
lore

MyungJoo Ham

author maintainer
#0 lore raw

PATCH 1/1 PM / devfreq: remove double put_device

When device_register() returns with error, it has already done put_device() on the input device pointer.

---
 drivers/devfreq/devfreq.c | 1 -
 1 file changed, 1 deletion(-)
drivers/devfreq/devfreq.c +0 -1
index 4f6079e..5200728 100644
@@ -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;
 	}
Signature · 1 line
1.9.1