mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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: fbe639b44a
("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>
This commit is contained in:
parent
903b08340b
commit
a161ffe4b8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue