Currently, In failure case the spin unlock is not taken care
which is locked before, also the variables are initailized in
specific senarios, with this change the variables are initialised
properly.
Change-Id: Ic6c40065e312dcd2e76dbf50304dfa8f4fb506e9
CRs-Fixed: 1073567