path: root/drivers/uwb/pal.c
diff options
authorJohan Hovold <>2016-11-01 12:13:31 +0100
committerGreg Kroah-Hartman <>2016-11-26 09:56:57 +0100
commitfd669bf2a09914ea7037302ec46985bb1eef8b4c (patch)
tree0ccaaafcdcbeecda509db14befe88e59f910b838 /drivers/uwb/pal.c
parentab17baeaea9108fc9ad22955bf8bba8ed363577f (diff)
uwb: fix device reference leaks
commit d6124b409ca33c100170ffde51cd8dff761454a1 upstream. 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 <> Signed-off-by: Greg Kroah-Hartman <>
Diffstat (limited to 'drivers/uwb/pal.c')
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);