diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-02-02 14:13:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 06:23:22 +0200 |
commit | a2828b9445919489c10afb2dab09b1e41676df6f (patch) | |
tree | 59eb5365052dedffd37ac1b145a26ce22c02d8f5 /drivers/hwtracing | |
parent | 3e2070abcc90909d6a10e32ba8cda5529a978e8c (diff) |
coresight: release reference taken by 'bus_find_device()'
[ Upstream commit f2dfab3568fc32afeac8b698481e80e7ab2dc658 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.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 a7d1edbf3340..5e2a2a5ad601 100644 --- a/drivers/hwtracing/coresight/coresight.c +++ b/drivers/hwtracing/coresight/coresight.c @@ -573,6 +573,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; |