Commit a216000f authored by Chris Lew's avatar Chris Lew Committed by Andy Gross

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: default avatarChris Lew <clew@codeaurora.org>
Acked-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
parent c7c1dc35
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment