diff options
| author | Jon Hunter <jonathanh@nvidia.com> | 2016-04-21 17:11:58 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-02 21:19:49 -0700 |
| commit | 3e19487b9bf5076dcc2cd79da3dbd57b94d4e6b7 (patch) | |
| tree | da78dc474634dd26430b3d9eb93c7cab81963e55 /scripts/patch-kernel | |
| parent | 804605eae410ef1d1f904706eaf50400c897434b (diff) | |
regulator: core: Clear the supply pointer if enabling fails
commit 8e5356a73604f53da6a1e0756727cb8f9f7bba17 upstream.
During the resolution of a regulator's supply, we may attempt to enable
the supply if the regulator itself is already enabled. If enabling the
supply fails, then we will call _regulator_put() for the supply.
However, the pointer to the supply has not been cleared for the
regulator and this will cause a crash if we then unregister the
regulator and attempt to call regulator_put() a second time for the
supply. Fix this by clearing the supply pointer if enabling the supply
after fails when resolving the supply for a regulator.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
