mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
soc: qcom: smem: Use le32_to_cpu for comparison
Endianness can vary in the system, add le32_to_cpu when comparing partition sizes from smem. Signed-off-by: Chris Lew <[email protected]> Acked-by: Bjorn Andersson <[email protected]> Signed-off-by: Andy Gross <[email protected]>
This commit is contained in:
parent
c7c1dc3587
commit
a216000f01
1 changed files with 1 additions and 1 deletions
|
|
@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (header->size != entry->size) {
|
||||
if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
|
||||
dev_err(smem->dev,
|
||||
"Partition %d has invalid size\n", i);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue