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 366ECA034F for ; Mon, 21 Feb 2022 08:56:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DB63410F2; Mon, 21 Feb 2022 08:56:01 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id E1A544068C; Mon, 21 Feb 2022 08:55:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645430158; x=1676966158; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kEo0R8hQF6DeXjJnmjLfC6xecSbGoSpL1Tut54fgFBQ=; b=eN8ugVLSc2Yrob90uBwfh3EHzN7r1tGJ6pHIWw4FphyKSnu65Z6KsoDY b7F9K1r+DJrjcJMt2Ipd7XO4e3VWrJwkfsRFy11C1V1pQ0eN15KalDxff Ej98rONWHSxPIZwSIEkb7V2dq3r94auA5y10R21fFAStT7fb+fnPUCc7N 53aqmn2IXF2bsatt/H0cYZUuKlFpTwvK6YKjdPgEqd/7ltEjOzHcwGTqR sSBIzrEZNxAvzJZ/vObKaH+ytVSuAJ5SyWjV19N9/6rtEwQgyw785xPTy Xu7bWpRGHQN5btgtXDRkt9mNaSB46HCh+vw+scUiFbTU7G2fuHc9tDPVc Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10264"; a="276049117" X-IronPort-AV: E=Sophos;i="5.88,385,1635231600"; d="scan'208";a="276049117" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2022 23:55:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,385,1635231600"; d="scan'208";a="490359436" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by orsmga003.jf.intel.com with ESMTP; 20 Feb 2022 23:55:38 -0800 From: Wei Huang To: dev@dpdk.org, rosen.xu@intel.com, qi.z.zhang@intel.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com Cc: stable@dpdk.org, tianfei.zhang@intel.com, ferruh.yigit@intel.com, Wei Huang Subject: [PATCH v5] raw/ifpga: initialize scalar variable before using Date: Mon, 21 Feb 2022 02:52:22 -0500 Message-Id: <20220221075222.306101-1-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220221063444.305376-1-wei.huang@intel.com> References: <20220221063444.305376-1-wei.huang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Scalar variable sub_brg_bdf may be used uninitialized in function ifpga_rawdev_fill_info(). It is initialized now in this fix. Coverity issue: 375805 Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree") Cc: stable@dpdk.org Signed-off-by: Wei Huang --- v2: add space after comma to meet coding style requirement --- v3: refine log --- v4: add coverity issue id --- v5: use simple initializer --- drivers/raw/ifpga/ifpga_rawdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index b73512d..6beecb7 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -216,7 +216,7 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev, char dir[1024] = "/sys/devices/"; char *c; int ret; - char sub_brg_bdf[4][16]; + char sub_brg_bdf[4][16] = {{0}}; int point; DIR *dp = NULL; struct dirent *entry; -- 1.8.3.1