]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds/led-class: Add missing put_device()
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Fri, 31 Jul 2015 11:36:21 +0000 (13:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:43:14 +0000 (14:43 -0700)
commit438437983e0cefa439e9b161f74b805d0416eec0
treea3fa1e096dfc626154f87191a75564c49a9df41c
parent6cdd2beb9a3627de301bc03474e0805e4b53efba
leds/led-class: Add missing put_device()

commit e5b5a61fcb3743f1dacf9e20d28f48423cecf0c1 upstream.

Devices found by class_find_device must be freed with put_device().
Otherwise the reference count will not work properly.

Fixes: a96aa64cb572 ("leds/led-class: Handle LEDs with the same name")
Reported-by: Alan Tull <delicious.quinoa@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/leds/led-class.c