OSDN Git Service

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)
commiteba757022fc2935c8a1392278a26d86761a70c60
treebf2d8b5932fe9891f575445160b30b641567a631
parent100d26e8ce65f33d229912be3bc563a93a786186
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