mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
soc: qcom: smem: Fix endian-unaware access of num_entries
[ Upstream commit 19e7aa0e9e46d0ad111a4af55b3d681b6ad945e0 ] Add a missing le32_to_cpu when accessing num_entries, which is always a little endian integer. Fixes booting on Xiaomi Mi 9T (xiaomi-davinci) in big endian. Signed-off-by: Jens Reidel <adrian@mainlining.org> Link: https://lore.kernel.org/r/20250726235646.254730-1-adrian@mainlining.org Signed-off-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b00d2572c1
commit
9ff6994c80
1 changed files with 1 additions and 1 deletions
|
|
@ -709,7 +709,7 @@ static u32 qcom_smem_get_item_count(struct qcom_smem *smem)
|
|||
if (IS_ERR_OR_NULL(ptable))
|
||||
return SMEM_ITEM_COUNT;
|
||||
|
||||
info = (struct smem_info *)&ptable->entry[ptable->num_entries];
|
||||
info = (struct smem_info *)&ptable->entry[le32_to_cpu(ptable->num_entries)];
|
||||
if (memcmp(info->magic, SMEM_INFO_MAGIC, sizeof(info->magic)))
|
||||
return SMEM_ITEM_COUNT;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue