gpiolib: don't dereference a desc before validation
authorVladimir Zapolskiy <vz@mleia.com>
Thu, 21 Dec 2017 16:37:24 +0000 (18:37 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 2 Jan 2018 08:31:20 +0000 (09:31 +0100)
commit30322bcf82d74cad0d6e1cf9ba7fa7fa48c7a026
treef46a497daef538e4bce3a9491db6dedbb9a1e8bf
parentfe13862c9cad6f7d7d4faa97f546eb94d4989f44
gpiolib: don't dereference a desc before validation

The fix restores a proper validation of an input gpio desc, which
might be needed to deal with optional GPIOs correctly.

Fixes: 02e479808b5d ("gpio: Alter semantics of *raw* operations to actually be raw")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c