soc: qcom: initialize local variable
authorTom Rix <trix@redhat.com>
Wed, 19 Aug 2020 18:46:37 +0000 (11:46 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 22 Nov 2020 03:51:42 +0000 (21:51 -0600)
commita161ffe4b877721d8917e18e70461d255a090f19
tree359bc4657245598deeb254b99305398d0fb00d27
parent903b08340b885689646713bc2ec5ae10c7dbe8db
soc: qcom: initialize local variable

clang static analysis reports this problem

pdr_interface.c:596:6: warning: Branch condition evaluates
  to a garbage value
        if (!req.service_path[0])
            ^~~~~~~~~~~~~~~~~~~~

This check that req.service_path was set in an earlier loop.
However req is a stack variable and its initial value
is undefined.

So initialize req to 0.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Reviewed-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20200819184637.15648-1-trix@redhat.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/soc/qcom/pdr_interface.c