[linux-yocto] [PATCH 04/14] FogBugz #554812: fpga: stratix10: unitialized data

Meng.Li at windriver.com Meng.Li at windriver.com
Wed May 16 02:14:38 PDT 2018


From: Alan Tull <atull 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 <atull at kernel.org>
Signed-off-by: Meng Li <Meng.Li at 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



More information about the linux-yocto mailing list