soc: qcom: ramdump: Fix elf phdr increment logic

To add support for elf64 dumps phdr was converted to a void
pointer, but the logic to increment the phdr was not updated
accordingly. This change increments the address of phdr based
on the elf class.

Fixes: fc0253777c4c ('soc: qcom: ramdump: Add support for elf64 dumps')
Change-Id: I103835cfa1333aacfc8fe8ca3ae02dc84607a5cc
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
This commit is contained in:
Gokul krishna Krishnakumar 2021-10-13 12:11:29 -07:00 committed by Guru Das Srinagesh
parent 72f355f2d0
commit 53346fbff0

View File

@ -206,7 +206,7 @@ int qcom_elf_dump(struct list_head *segs, struct device *dev, unsigned char clas
}
offset += segment->size;
phdr++;
phdr += sizeof_elf_phdr(class);
}
return qcom_devcd_dump(dev, data, data_size, GFP_KERNEL);