Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist()
@ 2023-01-20 13:47 Dan Carpenter
  2023-01-20 14:25 ` Steen Hegelund
  2023-01-24  5:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2023-01-20 13:47 UTC (permalink / raw)
  To: Lars Povlsen, Steen Hegelund
  Cc: Daniel Machon, UNGLinuxDriver, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Horatiu Vultur, netdev,
	kernel-janitors

The "eport" variable needs to be initialized to NULL for this code to
work.

Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP rule")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Probably you had CONFIG_INIT_STACK_ALL=y in your .config for this to
pass testing.

 drivers/net/ethernet/microchip/vcap/vcap_api.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api.c b/drivers/net/ethernet/microchip/vcap/vcap_api.c
index 71f787a78295..69c026778b42 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api.c
@@ -2012,7 +2012,8 @@ static int vcap_get_next_chain(struct vcap_control *vctrl,
 static bool vcap_path_exist(struct vcap_control *vctrl, struct net_device *ndev,
 			    int dst_cid)
 {
-	struct vcap_enabled_port *eport, *elem;
+	struct vcap_enabled_port *eport = NULL;
+	struct vcap_enabled_port *elem;
 	struct vcap_admin *admin;
 	int tmp;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-24  5:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-20 13:47 [PATCH net-next] net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist() Dan Carpenter
2023-01-20 14:25 ` Steen Hegelund
2023-01-20 15:10   ` Dan Carpenter
2023-01-24  5:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox