]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 30 Jan 2015 09:29:33 +0000 (10:29 +0100)
commit7dd2efe5d597aa188e3bcbf9300f86faa1e04ef3
treed45d58ae64b77999e3cb93f61194f0baabe68e14
parentdeaea30b69bbde71813aecc7900a32657a95c282
gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low

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: a4254f59ee9a ("gpiolib: add support for changing value polarity
in sysfs")
Cc: stable <stable@vger.kernel.org> # v2.6.33
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-sysfs.c