Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 21ba9d2c authored by Jennifer Liu's avatar Jennifer Liu Committed by Stephen Boyd
Browse files

msm: thermal: Initialize voltage rails pointers to NULL



In probe_psm and probe_vdd_rstr, certain code paths would call
kfree on psm_rails and rails respectively without them ever being
allocated. While this is OK the first time as static variables
are guaranteed to be NULL, the same guarantee cannot be applied if this
function is called twice. This would be the case if EPROBE_DEFER were to
be returned. This would cause us to free memory that does not belong to
the driver. To prevent this, initialize the pointers to null in probe_psm
and probe_vdd_rstr.

CRs-Fixed: 486018
Change-Id: Ic423518a1d4f4b0fcffc0532070a3514a5c94daf
Signed-off-by: default avatarJennifer Liu <chihning@codeaurora.org>
parent d6fc8c81
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