Commit 9fc47f82 authored by Marek Vasut's avatar Marek Vasut Committed by Lee Jones
Browse files

gpio: syscon: Fix possible NULL ptr usage



[ Upstream commit 70728c29 ]

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: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Change-Id: I1320f56ca2b1811f7d48ccaa50048811243f2dd0
parent 93358740
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment