提交 a5e9b937 编写于 作者: C Cai Zhiyong 提交者: MyungJoo Ham

PM / devfreq: fix double call put_device

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: NCai Zhiyong <caizhiyong@huawei.com>
Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com>
上级 ac4b2811
...@@ -620,7 +620,6 @@ int devfreq_remove_device(struct devfreq *devfreq) ...@@ -620,7 +620,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
return -EINVAL; return -EINVAL;
device_unregister(&devfreq->dev); device_unregister(&devfreq->dev);
put_device(&devfreq->dev);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册