diff options
author | Tom Rix <trix@redhat.com> | 2020-08-19 11:46:37 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-30 11:53:19 +0100 |
commit | 6d3131ace30336bb03b8b322e4fd6fdae7a6f4a1 (patch) | |
tree | aa62a04ffa71f7c8e6082344366825a37216c17b /drivers/soc | |
parent | 561397df16e3fa730fe3340f3065353ffcc18e07 (diff) | |
download | linux-stable-6d3131ace30336bb03b8b322e4fd6fdae7a6f4a1.tar.gz linux-stable-6d3131ace30336bb03b8b322e4fd6fdae7a6f4a1.tar.bz2 linux-stable-6d3131ace30336bb03b8b322e4fd6fdae7a6f4a1.zip |
soc: qcom: initialize local variable
[ Upstream commit a161ffe4b877721d8917e18e70461d255a090f19 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/pdr_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index 088dc99f77f3..f63135c09667 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -569,7 +569,7 @@ EXPORT_SYMBOL(pdr_add_lookup); int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds) { struct servreg_restart_pd_resp resp; - struct servreg_restart_pd_req req; + struct servreg_restart_pd_req req = { 0 }; struct sockaddr_qrtr addr; struct pdr_service *tmp; struct qmi_txn txn; |