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: Jennifer Liu <chihning@codeaurora.org>
1 file changed