]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low
authorJohan Hovold <johan@kernel.org>
Mon, 26 Jan 2015 11:02:46 +0000 (12:02 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 9 Feb 2015 09:19:52 +0000 (10:19 +0100)
commit6daef1d0b40c6f79d1b94b44f8b65429c7623589
treee352bb96ab6a7e957801f4ddd8fa3b2fadb305e1
parentad55af958b2349ffafbb145166322b83fa8fed9d
gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low

commit 49d2ca84e433dab854c7a866bc6add09cfab682d upstream.

Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when setting the
gpio-line polarity.

Fixes: 0769746183ca ("gpiolib: add support for changing value polarity in sysfs")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpio/gpiolib.c