gpio: fix error path in lineevent_create
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 16 Apr 2018 11:17:53 +0000 (13:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 26 Apr 2018 22:43:03 +0000 (00:43 +0200)
commitf001cc351ad3309ec8736c374e90e5a4bc472d41
treebda50b5256547fc45dfabf35f0c2c99d028e5c07
parentab3dbcf78f60f46d6a0ad63b1f4b690b7a427140
gpio: fix error path in lineevent_create

If gpiod_request() fails the cleanup must not call gpiod_free().

Cc: stable@vger.kernel.org
Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c