Message ID | Y3ZTQZYz5zz5nMg2@kadam (mailing list archive) |
---|---|
State | Accepted |
Commit | 62a45b384a2833fbdff4658a56dab38e9d6f4580 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v2] net: microchip: sparx5: prevent uninitialized variable | expand |
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem@davemloft.net>: On Thu, 17 Nov 2022 18:29:05 +0300 you wrote: > 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: > > [...] Here is the summary with links: - [net-next,v2] net: microchip: sparx5: prevent uninitialized variable https://git.kernel.org/netdev/net-next/c/62a45b384a28 You are awesome, thank you!
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c b/drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c index 8108f3767767..74abb946b2a3 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_dcb.c @@ -90,7 +90,7 @@ static int sparx5_dcb_app_validate(struct net_device *dev, static int sparx5_dcb_apptrust_validate(struct net_device *dev, u8 *selectors, int nselectors, int *err) { - bool match; + bool match = false; int i, ii; for (i = 0; i < ARRAY_SIZE(sparx5_dcb_apptrust_policies); i++) {