uwb: fix device reference leaks
authorJohan Hovold <johan@kernel.org>
Tue, 1 Nov 2016 11:13:31 +0000 (12:13 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:50:58 +0000 (03:50 +0000)
commit83e3a80d28686355c0567f1a89720b6b88d8b4a7
tree257334675a7ebcac391fd7491a14b740b443ecab
parent8a1509624b4db87773ae17289374b754422895de
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>
[bwh: Backported to 3.2:
 - Drop change to uwb_rc_class_device_exists()
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/uwb/lc-rc.c