diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2019-06-19 14:42:39 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-20 13:04:40 +0100 |
commit | 70ca117b02f3b1c8830fe95e4e3dea2937038e11 (patch) | |
tree | f5ef2dc417f66654762be7efba69a1bb91158abf /include/linux/mbus.h | |
parent | 7d293f56456120efa97c4e18250d86d2a05ad0bd (diff) |
regulator: s2mps11: Fix ERR_PTR dereference on GPIO lookup failure
If devm_gpiod_get_from_of_node() call returns ERR_PTR, it is assigned
into an array of GPIO descriptors and used later because such error is
not treated as critical thus it is not propagated back to the probe
function.
All code later expects that such GPIO descriptor is either a NULL or
proper value. This later might lead to dereference of ERR_PTR.
Only devices with S2MPS14 flavor are affected (other do not control
regulators with GPIOs).
Fixes: 1c984942f0a4 ("regulator: s2mps11: Pass descriptor instead of GPIO number")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/mbus.h')
0 files changed, 0 insertions, 0 deletions