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 6EA594541F; Thu, 13 Jun 2024 20:31:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22B85410EE; Thu, 13 Jun 2024 20:31:11 +0200 (CEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 7A483402E4 for ; Thu, 13 Jun 2024 20:31:09 +0200 (CEST) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2eae5b2ddd8so21781951fa.0 for ; Thu, 13 Jun 2024 11:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718303469; x=1718908269; 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=fGpr/R5JwuSn33oTOTQbcBY1EC+R1zfqddVs+hs30fo=; b=JSyVQXSgnab0V5pWAI9uMoIp0x34nzpRdruyb18t8qR7UIva45oy2DlHElQFOsP8Ps i3q428sTeZUhbvTsm5H7EsfOOHzzuY0vDZLF6vbvOSy4tQpUeSh5+yvfPSrLqrhW4GDp QxOIVj9l+g1HxubIssaG/tgnswzM3rn91fqsTGfia6nipLlEJrZiqHmVDO6uZz1TluSz Otv8BVzTlJ7xg1MseKGvZJZ8YwOP/p+2ODDK1Hz1AtYfHBWbghbvhMtlUGvK1KpWE6iO z2cjBG6iscisoqiTwSU8jkrPpgmt2gOaGOFXlADK9xQISzVjm8eL2HGX1kYkQC7QkIk0 TFSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718303469; x=1718908269; 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=fGpr/R5JwuSn33oTOTQbcBY1EC+R1zfqddVs+hs30fo=; b=ZB86Cn1P+ZYEK9U8c7bXNC9zLPZzz672TcZjtTMxYoqtbeSXAp/qrDofVpwpFSH2EU pr6+zN3C7AIhay8v4gGKsNDoWkzTzTDv9iPSKZl+Xq8OCqmZfzCu9iHVabzBuTQJ6Ffe ovfHfXzCVunX5hBeP3Ac2EX+tkdYyOwlTzFM59qglrrMtSZ11l5fF2vgJUyVnawOwtIf 1hN3SlNWWZDlxljEmckDh6IqSkPOW8L3qNjD+bWJQEF7/TUWxZxo1lAb6Ls/eznFGktx 28oppiZWE7dMB07wa44ptUB76YAy2i0c1+ck5cW2lBOGOdJ/IpNUufcfsR7WXSrSMdvO K1Dg== X-Gm-Message-State: AOJu0Yxle6grin3/KR4F1EM8U7l8e8N4xBLeTXqOEwcyeNCQ3QUYdk7G eGCRNQzqEe4XHBRmKZdEz37xbD8Cue3vjz6oJVBaq4+vUka9gsfP X-Google-Smtp-Source: AGHT+IGMtx3ZauDhTKIKh30IWasnDRBao8EBiZUWdLlBL3eOg91t6/UKDWH8DaOotApveh1ebpLgZw== X-Received: by 2002:a19:911b:0:b0:52c:7fc8:8658 with SMTP id 2adb3069b0e04-52ca0465643mr973802e87.34.1718303468428; Thu, 13 Jun 2024 11:31:08 -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-52ca282eedesm315461e87.83.2024.06.13.11.31.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 11:31:07 -0700 (PDT) From: Mahmoud Maatuq To: Long Li Cc: dev@dpdk.org, Mahmoud Maatuq Subject: [PATCH v4] net/mana: fix uninitialized scalar variable Date: Thu, 13 Jun 2024 22:30:39 +0400 Message-ID: <20240613183040.865732-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 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: Mahmoud Maatuq --- v4: * used full name in the sign off 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