Skip to content

Commit a216000

Browse files
Chris LewAndy Gross
authored andcommitted
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 <clew@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
1 parent c7c1dc3 commit a216000

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/smem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
698698
return -EINVAL;
699699
}
700700

701-
if (header->size != entry->size) {
701+
if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
702702
dev_err(smem->dev,
703703
"Partition %d has invalid size\n", i);
704704
return -EINVAL;

0 commit comments

Comments
 (0)