summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/palmas-regulator.c
diff options
context:
space:
mode:
authorWen Yang <wenyang@linux.alibaba.com>2019-11-24 15:58:35 +0100
committerMark Brown <broonie@kernel.org>2019-11-27 13:53:48 +0100
commit4affd79a125ac91e6a53be843ea3960a8fc00cbb (patch)
treebb42d14a7ee8ee531d8332ad4280b1747aeaf371 /drivers/regulator/palmas-regulator.c
parentregulator: da9062: Return REGULATOR_MODE_INVALID for invalid mode (diff)
downloadlinux-4affd79a125ac91e6a53be843ea3960a8fc00cbb.tar.xz
linux-4affd79a125ac91e6a53be843ea3960a8fc00cbb.zip
regulator: fix use after free issue
This is caused by dereferencing 'rdev' after put_device() in the _regulator_get()/_regulator_put() functions. This patch just moves the put_device() down a bit to avoid the issue. Signed-off-by: Wen Yang <wenyang@linux.alibaba.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191124145835.25999-1-wenyang@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
0 files changed, 0 insertions, 0 deletions