]> git.baikalelectronics.ru Git - kernel.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)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Fri, 28 Aug 2015 12:06:19 +0000 (14:06 +0200)
commit4a9295ef9d19cf671e9445c492bf1290a1399a78
tree957d8c7ed82f3796d1307b3bb300ad1c2507800f
parent49d0151f5ce8dfa54694a84fb0662c6a8f4f0c55
leds/led-class: Add missing put_device()

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

Fixes: d639487ba5d1 ("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>
drivers/leds/led-class.c