Commit 94a2aa3c authored by Chris Lew's avatar Chris Lew Committed by Kleber Sacilotto de Souza

soc: qcom: smem: Use le32_to_cpu for comparison

BugLink: https://bugs.launchpad.net/bugs/1875905

[ Upstream commit a216000f ]

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>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent a2e3ddf5
......@@ -646,7 +646,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