]> git.baikalelectronics.ru Git - kernel.git/commit
soc: qcom: smem: always ignore partitions with 0 offset or size
authorAlex Elder <elder@linaro.org>
Tue, 26 Jun 2018 00:58:47 +0000 (19:58 -0500)
committerAndy Gross <andy.gross@linaro.org>
Thu, 13 Sep 2018 21:56:55 +0000 (16:56 -0500)
commit8620ecbdc4b09f0836f02e2037457368241c162b
treebf2d8b5932fe9891f575445160b30b641567a631
parent813ada2fd50e75b558c51196f138041c0438cde3
soc: qcom: smem: always ignore partitions with 0 offset or size

In qcom_smem_enumerate_partitions(), any partition table entry
having a zero offset or size field is ignored.  Move those checks
earlier in the loop, because there's no sense in examining the
host fields for those entries.

Add the same checks in qcom_smem_set_global_partition(), so the
scan for the global partition skips over these invalid entries.
This allows a later check for zero size or offset once the global
entry is found to be eliminated.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/smem.c