PM / devfreq: remove double put_device
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 16 May 2016 02:41:57 +0000 (11:41 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 22 Jun 2016 04:52:52 +0000 (13:52 +0900)
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

index 3e1afb4ac77c01efb2066e5f457b476d4610c2bc..0ebd64dfc0a98bedfd7eaf45107430ef505a8253 100644 (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;
        }