]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: fix using match before it is set
authorTom Rix <trix@redhat.com>
Tue, 18 Jan 2022 13:41:10 +0000 (05:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jan 2022 14:34:43 +0000 (14:34 +0000)
commitae7689ef582d857f7a207c68a07ae1bd7f31a086
tree319e90aae50aca0e334b3f6f373b58d4b1b1c251
parent39560238d8ed3646ffde16d33e3890506db79e1f
net: mscc: ocelot: fix using match before it is set

Clang static analysis reports this issue
ocelot_flower.c:563:8: warning: 1st function call argument
  is an uninitialized value
    !is_zero_ether_addr(match.mask->dst)) {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The variable match is used before it is set.  So move the
block.

Fixes: fd66c57872fc ("net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot_flower.c