Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;