octeontx2-af: initialize action variable
authorTom Rix <trix@redhat.com>
Sat, 26 Mar 2022 16:03:06 +0000 (09:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Mar 2022 21:14:04 +0000 (14:14 -0700)
commit33b5bc9e703383e396f275d51fc4bafa48dbae5a
tree5f3c46b51de4db96c10ee60c84508968f4d6f400
parent0906f3a3df07835e37077d8971aac65347f2ed57
octeontx2-af: initialize action variable

Clang static analysis reports this representative issue
rvu_npc.c:898:15: warning: Assigned value is garbage
  or undefined
  req.match_id = action.match_id;
               ^ ~~~~~~~~~~~~~~~

The initial setting of action is conditional on
 if (is_mcam_entry_enabled(...))
The later check of action.op will sometimes be garbage.
So initialize action.

Reduce setting of
  *(u64 *)&action = 0x00;
to
  *(u64 *)&action = 0;

Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c