gpiolib: sanitize flags before allocating memory in lineevent_create()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 16 Sep 2019 09:46:23 +0000 (11:46 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 1 Oct 2019 10:07:21 +0000 (12:07 +0200)
commitbcc6d99ac913e3115cfa564534c432b950408e21
treea0ddcd57a3e130a8db2754f6977862a30330696b
parentc8f3d144004dd3f471ffd414690d15a005e4acd6
gpiolib: sanitize flags before allocating memory in lineevent_create()

Move all the flags sanitization before any memory allocation in
lineevent_create() in order to remove a couple unneeded gotos.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpiolib.c