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 7583541F52; Mon, 10 Jun 2024 23:43:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 113F4402A9; Mon, 10 Jun 2024 23:43:43 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 7EB6540261 for ; Mon, 10 Jun 2024 23:43:41 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52bc335e49aso563879e87.3 for ; Mon, 10 Jun 2024 14:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718055821; x=1718660621; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6F/EUZ9+/s7MB+Op5k8LP21YvC5Y6lIeG9AM9m21Xl4=; b=KF/SYlCVtkX1wmlpOI4crmJ/v9udMnSyLbX4H7MkKhGLFY1gr8FKg2GvktpSPr8a68 /IzDOmSKSm1GU7PUspmIPcf7RHpLLKLycMLPmjmAae8pnNqAH6gFs179dxWco/y3LwlV Wgkg4qdJDu2qZ7l6MxpD2JagkUVS1h12SDT/UPuqc+Zv57wp4Huonxp4z1BvpNx0PiyI aF9QyT9yonCrLQW0vooYf93yIQvlN1F034YuwTdEmcO5A5/gQ+pvLsrmeE6qsVX8tvJX cwzEnnVojljBX2QqvgEv/IpSpvaaZuaG3KnIH4rYFKDKuOJZSkhXV9+bPFwpa837IouY LMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718055821; x=1718660621; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6F/EUZ9+/s7MB+Op5k8LP21YvC5Y6lIeG9AM9m21Xl4=; b=veR/bla8p++Sbdry7o3OnbFtCvGzd3PgMJTtPLh3RY+oqn2hgxgRJF30rw5cB0CCdP UdxwvQRiefj2Rig/Svd5cqJIE/FSRwRA6NVSAz1WAL6uZllki+HmP9sU12nqy1j6v0B0 BlajPHzT7eO59T0ldE3teIJgsHsTA+D4ewTNt99HyRdnV9o47CUkOXGinsXSiNM1RbVl gtepAFqsOoLHI7tDUjxAh2JnLGa+ifV9fvf07jCPemOj8PTMpzh6CkqnpWORlbSGDK/O xND+BuIyRgwNB09n+YhuECd90pS3FXBKK7kRd2z5htNDwOe3gc7kM93TvZAedxcBYbUF Vucg== X-Gm-Message-State: AOJu0YwrGahi8r/s+aaGngbMIICcdoQzir6L42aOwuGEHcnZyrTOaPIN +ez/uTGZKu/5oo2Y3/vEm/x+As5l3YXZAmctbBDN4Te1ueO5qHuR X-Google-Smtp-Source: AGHT+IH/kqoLK0RvAvJ3Lc/CSB5WfO2f9QQQX5V1si7BUbU/eJRJTNo2YTopQsQlc8fFHVSM1nyD2Q== X-Received: by 2002:a19:641a:0:b0:516:cc2d:f6a1 with SMTP id 2adb3069b0e04-52bb9fc572cmr5900796e87.51.1718055820496; Mon, 10 Jun 2024 14:43:40 -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-52c8a58249esm774644e87.248.2024.06.10.14.43.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 14:43:40 -0700 (PDT) From: mmaatuq To: Long Li Cc: dev@dpdk.org, mmaatuq Subject: [PATCH] net/mana: fix uninitialized scalar variable Date: Tue, 11 Jun 2024 01:43:20 +0400 Message-ID: <20240610214320.676239-1-mahmoudmatook.mm@gmail.com> X-Mailer: git-send-email 2.43.0 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 arbitray value. Coverity issue: 424690 Signed-off-by: mmaatuq --- 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