diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-01 12:13:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-26 09:54:53 +0100 |
commit | 680bc27065b9792373c1b7d4491bd58c03757f0d (patch) | |
tree | d173296c9b7cf05c1e7c84c151ea48a879d208b0 /drivers/uwb/pal.c | |
parent | dd214a159de6089aa0f33e56e54f20016d96bbd7 (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 <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.c | 2 |
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); } |