Re: [PATCH] net: mscc: ocelot: fix using match before it is set

From: Vladimir Oltean
Date: Thu Jan 20 2022 - 12:08:59 EST


On Tue, Jan 18, 2022 at 05:41:10AM -0800, trix@xxxxxxxxxx wrote:
> From: Tom Rix <trix@xxxxxxxxxx>
>
> 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: 75944fda1dfe ("net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1")
> Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>

(sorry for the delay)