diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-02-02 21:13:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-08 06:11:10 (GMT) |
commit | f2dfab3568fc32afeac8b698481e80e7ab2dc658 (patch) | |
tree | a110852eae4e9221a55eb91506d0f7d96ef90626 /drivers/hwtracing | |
parent | fae54158792aec705620bdc3938d342879204f0c (diff) | |
download | linux-f2dfab3568fc32afeac8b698481e80e7ab2dc658.tar.xz |
coresight: release reference taken by 'bus_find_device()'
The reference count taken by function bus_find_device() needs
to be released if a child device is found, something this patch
is adding.
Reported-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r-- | drivers/hwtracing/coresight/coresight.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index 8872db4..a35ca54 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -570,6 +570,8 @@ static void coresight_fixup_device_conns(struct coresight_device *csdev) if (dev) { conn->child_dev = to_coresight_device(dev); + /* and put reference from 'bus_find_device()' */ + put_device(dev); } else { csdev->orphan = true; conn->child_dev = NULL; |