Skip to content
Commit 0ef6ac6c authored by Alexandre Torgue's avatar Alexandre Torgue Committed by Greg Kroah-Hartman
Browse files

pinctrl: pinmux: fix a possible null pointer in pinmux_can_be_used_for_gpio



[ Upstream commit 6ba2fd39 ]

This commit adds a check on ops pointer to avoid a kernel panic when
ops->strict is used. Indeed, on some pinctrl driver (at least for
pinctrl-stmfx) the pinmux ops is not implemented. Let's assume than gpio
can be used in this case.

Fixes: 472a61e7 ("pinctrl/gpio: Take MUX usage into account")
Signed-off-by: default avatarAlexandre Torgue <alexandre.torgue@st.com>
Link: https://lore.kernel.org/r/20191204144106.10876-1-alexandre.torgue@st.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2d68f35b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment