PM / devfreq: fix double call put_device
authorCai Zhiyong <caizhiyong@huawei.com>
Sat, 14 May 2016 06:13:30 +0000 (14:13 +0800)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 22 Jun 2016 04:52:43 +0000 (13:52 +0900)
1295  */
1296 void device_unregister(struct device *dev)
1297 {
1298         pr_debug("device: '%s': %s\n", dev_name(dev), __func__);
1299         device_del(dev);
1300         put_device(dev);
1301 }
1302 EXPORT_SYMBOL_GPL(device_unregister);
1303

device_unregister is called put_device, there is no need to call
put_device(&devfreq->dev) again.

Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c

index 6f33c1e..3e1afb4 100644 (file)
@@ -620,7 +620,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
                return -EINVAL;
 
        device_unregister(&devfreq->dev);
-       put_device(&devfreq->dev);
 
        return 0;
 }