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 E55C3A0032; Fri, 18 Feb 2022 04:12:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E04240395; Fri, 18 Feb 2022 04:12:32 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 61E3840150; Fri, 18 Feb 2022 04:12:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645153950; x=1676689950; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+b1HnIQwnmszYuinDQBUqbGmLoDmgPBzwRlPdDs0b8I=; b=mlGjHLaVk/hLOCn+WlLcjc1jHG8KyTREHhIW44Bk84nn8HK6KfFsHntb 0wDeYwyxxnsNqZV4dV0VBFBgQ3BlJr/exV712RvstYx9Swg5CGLPPcrzb e8MYl+zjw9hENxXugmazF4H8f612L6B3e5hEdfyLPrIQMhEkzrGVKFOz3 /6zGnXdXfN+VvdW+eGtpNnQk/nAqOMw91g5cRYHpMQPAKJuzL/0LJLjr4 kgW/R3hFf6cccGvs2QdZAx7Bif+W7wBo5csv6s3OoRqiK7uqXZF/IXQk3 SRywK4U28Ul7QFVX94PR1vJEqtSsVKSnndUtpPTS7R+MOUfE8fDp2nmxA Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="248634628" X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="248634628" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 19:12:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="503823545" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by orsmga002.jf.intel.com with ESMTP; 17 Feb 2022 19:12:26 -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 v1] raw/ifpga: initialize scalar variable before using Date: Thu, 17 Feb 2022 22:09:10 -0500 Message-Id: <20220218030910.265812-1-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 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 Scalar variable sub_brg_bdf may be used uninitialized in function ifpga_rawdev_fill_info(), this fix initialize it. Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree") Cc: stable@dpdk.org Signed-off-by: Wei Huang --- 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..b02eb23 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},{0},{0},{0}}; int point; DIR *dp = NULL; struct dirent *entry; -- 1.8.3.1