gpio: syscon: Fix possible NULL ptr usage
authorMarek Vasut <marex@denx.de>
Wed, 3 Oct 2018 22:52:52 +0000 (00:52 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Oct 2018 08:33:11 +0000 (10:33 +0200)
commit70728c29465bc4bfa7a8c14304771eab77e923c7
treecb1500a167ef166b30292403a2a5780d2a32d25c
parent3edfb7bd76bd1cba6b917736943dffd799deed8a
gpio: syscon: Fix possible NULL ptr usage

The priv->data->set can be NULL while flags contains GPIO_SYSCON_FEAT_OUT
and chip->set is valid pointer. This happens in case the controller uses
the default GPIO setter. Always use chip->set to access the setter to avoid
possible NULL pointer dereferencing.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-syscon.c