gpio: fix line flag validation in linehandle_create
authorKent Gibson <warthog618@gmail.com>
Mon, 9 Sep 2019 03:22:18 +0000 (03:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Sep 2019 07:09:33 +0000 (09:09 +0200)
commit22ed1d47281155d5ecd39e526027c93a096325c7
tree33e825da68714012f07d6c8d487a7af6770fe712
parent705df757e9370de01973f311c1d0a788efd69c92
gpio: fix line flag validation in linehandle_create

commit e95fbc130a162ba9ad956311b95aa0da269eea48 upstream.

linehandle_create should not allow both GPIOHANDLE_REQUEST_INPUT
and GPIOHANDLE_REQUEST_OUTPUT to be set.

Fixes: d7c51b47ac11 ("gpio: userspace ABI for reading/writing GPIO lines")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib.c