From: Alan Tull <at...@kernel.org>

commit e85199e8db5bc5c8880f95b5e8fec05d52ddd5d0 from
https://github.com/altera-opensource/linux-socfpga.git

Address the following issue caught by static code analysis:

drivers/fpga/stratix10-soc.c:206 --  -- UNINIT.STACK.MUST
(1:Critical) Analyze 'payload.flags' is used uninitialized
in this function.

Signed-off-by: Alan Tull <at...@kernel.org>
Signed-off-by: Meng Li <meng...@windriver.com>
---
 drivers/fpga/stratix10-soc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c
index 9648387..2974c8e 100644
--- a/drivers/fpga/stratix10-soc.c
+++ b/drivers/fpga/stratix10-soc.c
@@ -201,6 +201,7 @@ static int s10_ops_write_init(struct fpga_manager *mgr,
        uint i;
        int ret;
 
+       payload.flags = 0;
        if (info->flags & FPGA_MGR_PARTIAL_RECONFIG) {
                dev_info(dev, "Requesting partial reconfiguration.\n");
                payload.flags |= BIT(COMMAND_RECONFIG_FLAG_PARTIAL);
-- 
2.7.4

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to