soc: qcom: smem: fix qcom_smem_set_global_partition()
authorAlex Elder <elder@linaro.org>
Tue, 10 Apr 2018 22:25:41 +0000 (17:25 -0500)
committerAndy Gross <andy.gross@linaro.org>
Fri, 25 May 2018 20:53:55 +0000 (15:53 -0500)
commit8fa1a21409da6abfe890f66532f9fcd8d2c25a3d
tree307f9d4ccf5a83974710e42b11baa3d6a9d1d909
parent8377f8181da8dce24ace68a43e280f6a6cb2c51c
soc: qcom: smem: fix qcom_smem_set_global_partition()

If there is at least one entry in the partition table, but no global
entry, the qcom_smem_set_global_partition() should return an error
just like it does if there are no partition table entries.

It turns out the function still returns an error in this case, but
it waits to do so until it has mistakenly treated the last entry in
the table as if it were the global entry found.

Fix the function to return immediately if no global entry is found
in the table.

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