Skip to content
Commit 62a45b38 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net: microchip: sparx5: prevent uninitialized variable

Smatch complains that:

    drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c:112
    sparx5_dcb_apptrust_validate() error: uninitialized symbol 'match'.

This would only happen if the:

	if (sparx5_dcb_apptrust_policies[i].nselectors != nselectors)

condition is always true (they are not equal).  The "nselectors"
variable comes from dcbnl_ieee_set() and it is a number between 0-256.
This seems like a probably a real bug.

Fixes: 23f8382c

 ("net: microchip: sparx5: add support for apptrust")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarDaniel Machon <daniel.machon@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ef8c373b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment