From: MyungJoo Ham Date: Mon, 16 May 2016 02:41:57 +0000 (+0900) Subject: PM / devfreq: remove double put_device X-Git-Tag: v4.7-rc5~16^2~2^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=67ffdb529b4ec9833f73947dec01eaa78dd53c3d;p=karo-tx-linux.git 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 --- 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, 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; }