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 C13CEA00BE for ; Fri, 18 Feb 2022 04:24:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B757A4113F; Fri, 18 Feb 2022 04:24:16 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id BF71440150; Fri, 18 Feb 2022 04:24:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645154654; x=1676690654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JiQ1qkR4oOvnqFSH3hPBQwAkwFfwPFicbXCFGhb1ERA=; b=ZtzDg6JYym8WfC94p1hovQHZa8qohVFgvYGxbMcDjizLrLiR8In524Bu 0jVDajm1JVGuh3C4uCUPH6XIEiFuly33Xyzcrp02IgrXLusAQiVgZddOK dkRxBM5i+s2Tuke15zuJew1hz4chG+H9bfAl7Z1NVgEvmFLFC5DyCnaS4 WzHdOhJj95L9Bfdq9KmAjKTgudkrc5Tmh0Oxk4+HHyK4O+vtgXQPSDG4S ccIdq+lt/Qs3WnfrJtUqR7CNNEnbqu2wJTS2PZRhyzWZ9GudAYPpVS1Tp +pi1fhqRUOjjKpTe6J5VStguuR8NHGmRWwiABdUZ7LUbxVDYfOQrytkCj Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="231678833" X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="231678833" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 19:24:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="572138180" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by orsmga001.jf.intel.com with ESMTP; 17 Feb 2022 19:24:10 -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 v2] raw/ifpga: initialize scalar variable before using Date: Thu, 17 Feb 2022 22:20:53 -0500 Message-Id: <20220218032053.266035-1-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220218030910.265812-1-wei.huang@intel.com> References: <20220218030910.265812-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(), this fix initialize it. 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 --- 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..c133a94 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