gpio: free handles in fringe cases
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 4 Jul 2016 11:13:04 +0000 (13:13 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 4 Jul 2016 14:54:36 +0000 (16:54 +0200)
commitd932cd49182f97966d196fb5301bfca90f58a360
tree9a94e87c0723413c4a6319fa080e02bffdcee003
parenta944a892aa8ddecf6e2df432e6965dc86d73e3aa
gpio: free handles in fringe cases

If we fail when copying the ioctl() struct to userspace we still
need to clean up the cruft otherwise left behind or it will stay
around until the issuing process terminates the file handle.

Reported-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c