All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-rc] RDMA/hns: Fix the use of uninitialized variable
@ 2026-09-14  2:48 Junxian Huang
  2026-09-14  2:57 ` sashiko-bot
  2026-09-15 13:42 ` Leon Romanovsky
  0 siblings, 2 replies; 3+ messages in thread
From: Junxian Huang @ 2026-09-14  2:48 UTC (permalink / raw)
  To: jgg, leon, linux-rdma; +Cc: tangchengchang, huangjunxian6, linuxarm

The variable 'i' is used without being initialized in active-backup
mode.

Fixes: d9023e461b73 ("RDMA/hns: Implement bonding init/uninit process")
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
---
 drivers/infiniband/hw/hns/hns_roce_bond.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_bond.c b/drivers/infiniband/hw/hns/hns_roce_bond.c
index f2b12ae13a58..21de82b864d3 100644
--- a/drivers/infiniband/hw/hns/hns_roce_bond.c
+++ b/drivers/infiniband/hw/hns/hns_roce_bond.c
@@ -81,7 +81,7 @@ static int hns_roce_set_bond_netdev(struct hns_roce_bond_group *bond_grp,
 {
 	struct net_device *active_dev;
 	struct net_device *old_dev;
-	int i, ret = 0;
+	int i = 0, ret = 0;
 
 	if (bond_grp->tx_type == NETDEV_LAG_TX_TYPE_ACTIVEBACKUP) {
 		rcu_read_lock();
-- 
2.33.0


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

end of thread, other threads:[~2026-09-15 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14  2:48 [PATCH for-rc] RDMA/hns: Fix the use of uninitialized variable Junxian Huang
2026-09-14  2:57 ` sashiko-bot
2026-09-15 13:42 ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.