mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
soc: qcom: pil: Handle uninitialized 'ret'
The commit <a0a9abc9fc> (pil: Fix minidump collection during
SSR) failed to set the value of 'ret' in pil_do_minidump() upon
the return failure from prepare_minidump_segments(). As a result,
the 'goto seg_mapping_fail' will end up returning uninitialized
value. Hence, assign an error code explicitly to avoid this situation.
Change-Id: I20f0d2c4fd006483c73541937025ed50b265e2b4
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
parent
9e1aed8fb7
commit
93a3687671
1 changed files with 3 additions and 1 deletions
|
|
@ -398,8 +398,10 @@ static int pil_do_minidump(struct pil_desc *desc, void *ramdump_dev)
|
|||
next_offset = prepare_minidump_segments(ramdump_segs, region_info_ss,
|
||||
ss_mdump_seg_cnt_ss,
|
||||
&ss_valid_seg_cnt);
|
||||
if (next_offset < 0)
|
||||
if (next_offset < 0) {
|
||||
ret = -ENOMEM;
|
||||
goto seg_mapping_fail;
|
||||
}
|
||||
|
||||
if (desc->num_aux_minidump_ids > 0) {
|
||||
ret = prepare_aux_minidump_segments(&ramdump_segs[next_offset],
|
||||
|
|
|
|||
Loading…
Reference in a new issue