Commit b683c8a0 authored by Mathieu Poirier's avatar Mathieu Poirier Committed by Stefan Bader

coresight: release reference taken by 'bus_find_device()'

BugLink: https://bugs.launchpad.net/bugs/1826212

[ Upstream commit f2dfab35 ]

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: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent ca5149e0
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment