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)
commit49d2ca84e433dab854c7a866bc6add09cfab682d
treed45d58ae64b77999e3cb93f61194f0baabe68e14
parent0f303db08df0df9bd0966443ad6001e63960af16
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: 0769746183ca ("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