Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401065
| From | Caizhiyong <caizhiyong@hisilicon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] devfreq: fix double call put_device |
| Date | 2016-05-14 08:30 +0200 |
| Message-ID | <ryBfk-38X-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Cai Zhiyong <caizhiyong@huawei.com>
Date: Sat, 14 May 2016 14:13:30 +0800
Subject: [PATCH] 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: Cai Zhiyong <caizhiyong@huawei.com>
---
drivers/devfreq/devfreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 1d6c803..8de22c0 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -621,7 +621,6 @@ int devfreq_remove_device(struct devfreq *devfreq)
return -EINVAL;
device_unregister(&devfreq->dev);
- put_device(&devfreq->dev);
return 0;
}
--
1.7.9.5
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] devfreq: fix double call put_device Caizhiyong <caizhiyong@hisilicon.com> - 2016-05-14 08:30 +0200 Re: [PATCH] devfreq: fix double call put_device Chanwoo Choi <cw00.choi@samsung.com> - 2016-05-18 13:10 +0200
csiph-web