From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 24FAB44123; Wed, 12 Jun 2024 20:24:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3805402C6; Wed, 12 Jun 2024 20:24:23 +0200 (CEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id AD810402B9 for ; Wed, 12 Jun 2024 20:24:21 +0200 (CEST) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-52bc3130ae6so246770e87.3 for ; Wed, 12 Jun 2024 11:24:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718216661; x=1718821461; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c0wOUNsQenRe5/chUynx0G+Bbhi5PZuabum12nVH5tQ=; b=h5wrXAFz5vtsdoh23gtGbTwVN3+vTdaBxYzWWBDqgor4PVjTsR/l2T8FvYcsWbLuEz HPrwva/vxpyHzmK1EqPOGp9zMP+TsnHiJ7cJTjOXiPS37Oe8n4WB2tvtm0vGPlLZMJqT +3BypQLXnmgnJBg7hEtdG8szoZd3kC+tKMko5275GWY4E5lt65ZFf3JOWJ8HbgB5frTt T52wFe7t37U3RLDRS9iJVDGLRqdG/AaAUufZBEV7QReooXJvqQ1tl0T1CGk3Y4crfPVt 9VaA01nrdbMInVct/9kzTpNEk0IKSgYFCTmnXGFhjYgIZPWFVMduc+u+if42hUNfGi3W I5Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718216661; x=1718821461; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c0wOUNsQenRe5/chUynx0G+Bbhi5PZuabum12nVH5tQ=; b=XTF1UCrvW2u9m3Mw4Jufg8FnoWyRZ9GXxGwzr1SqntUj//C0G0sxMVGPG+IiE7MeZA J+D4xBAPqFTEUStCb3Zom+P+w6UalMOC1rssUlKMImv6E71znfALofu0m5p80u+PzZ7K klGihbAC3e9HhrTYgoXdr6QLAkNyX6JnowUDDyrp5qfP5Dj1o6+nwbY0ptNtf0WKgPvt 2T6rxVXkzR8FcyS3JZJ5SlPJeFYTtcjfRjY/knNWN59GHZe6MfvD7mM9aHKXB9V0zoCf 7ap7q4k4nmhBVMMPga3e4Bj/gn+v/Pcx1leTnzME01f6yFTetoVuynQkQmDenlv3dtw7 bytQ== X-Gm-Message-State: AOJu0Yw0z6f5PU8H2OV1f+SXHqgoIWlwJ8M20QkVBZQMHm5c0ON6L/zP NbvTdFbujT7badzFgB3wD54Hj/IQdJCrW0tdLUKJEfaX2/X8LPVW X-Google-Smtp-Source: AGHT+IHB+W5dAUBnv/sbxgvHKHcv9z9nYRJdE8W0hwNNFIyhyGTXjOyGPCEm65rSCCfMDjQfOE3uIg== X-Received: by 2002:ac2:46f6:0:b0:52c:84a2:6e0f with SMTP id 2adb3069b0e04-52c9a3c768fmr1447123e87.15.1718216660763; Wed, 12 Jun 2024 11:24:20 -0700 (PDT) Received: from localhost.localdomain.xyz (bba-2-50-153-135.alshamil.net.ae. [2.50.153.135]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52c8271e30esm1879031e87.193.2024.06.12.11.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 11:24:20 -0700 (PDT) From: Mahmoud Maatuq To: Long Li Cc: dev@dpdk.org, mmaatuq Subject: [PATCH v3] net/mana: fix uninitialized scalar variable Date: Wed, 12 Jun 2024 22:23:31 +0400 Message-ID: <20240612182332.804748-1-mahmoudmatook.mm@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240610214320.676239-1-mahmoudmatook.mm@gmail.com> References: <20240610214320.676239-1-mahmoudmatook.mm@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: mmaatuq in case we didn't enter or finished the loop without getting ifname we ret shouldn't have an arbitrary value. Coverity issue: 424690 Fixes: 84497839d9ca ("net/mana: support MTU update") Cc: longli@microsoft.com Signed-off-by: mmaatuq --- v3: * add Fixes and Cc tags v2: * Fixed typo in word "arbitrary" --- drivers/net/mana/mana.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 68c625258e..c37c4e3444 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -715,7 +715,7 @@ mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused) static int mana_get_ifname(const struct mana_priv *priv, char (*ifname)[IF_NAMESIZE]) { - int ret; + int ret = -ENODEV; DIR *dir; struct dirent *dent; -- 2.43.0