Skip to content

Commit

Permalink
FogBugz #554812: fpga: stratix10: unitialized data
Browse files Browse the repository at this point in the history
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@kernel.org>
  • Loading branch information
atull-altera committed Apr 25, 2018
1 parent 26ee43d commit 520cde6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/fpga/stratix10-soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 520cde6

Please sign in to comment.