aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb/pal.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-11-01 12:13:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-01 09:04:04 -0600
commitd6124b409ca33c100170ffde51cd8dff761454a1 (patch)
tree206aabea49fc3f514eb2ac0f70945fc582a50214 /drivers/uwb/pal.c
parentMerge tag 'fixes-for-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus (diff)
downloadlinux-dev-d6124b409ca33c100170ffde51cd8dff761454a1.tar.xz
linux-dev-d6124b409ca33c100170ffde51cd8dff761454a1.zip
uwb: fix device reference leaks
This subsystem consistently fails to drop the device reference taken by class_find_device(). Note that some of these lookup functions already take a reference to the returned data, while others claim no reference is needed (or does not seem need one). Fixes: 183b9b592a62 ("uwb: add the UWB stack (core files)") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uwb/pal.c')
-rw-r--r--drivers/uwb/pal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/uwb/pal.c b/drivers/uwb/pal.c
index c1304b8d4985..678e93741ae1 100644
--- a/drivers/uwb/pal.c
+++ b/drivers/uwb/pal.c
@@ -97,6 +97,8 @@ static bool uwb_rc_class_device_exists(struct uwb_rc *target_rc)
dev = class_find_device(&uwb_rc_class, NULL, target_rc, find_rc);
+ put_device(dev);
+
return (dev != NULL);
}