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 5B8F2A034E; Mon, 21 Feb 2022 03:23:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E78BF4068C; Mon, 21 Feb 2022 03:23:40 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 22EAD40395; Mon, 21 Feb 2022 03:23:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645410219; x=1676946219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FPGg6SqS9cRmkNoIyPLyloPSXrLxrB/Kpd7WK+nxCAk=; b=OmL2pWW1pF8aGEYzkF5jm1rf9Lbf9Ba5e7Lw1tqQEvOWxfJBBYmQZ1Rb JtqiY+zhli6TmfyjdpSyiBSgOT4+00XFJ/gdd4BDx4I20pO7CkyRpDVoo 4X5AJxzuNYpCjLxtOrWQdhBcQOIiEzCUhUF3UtB/XK0SVI0iW7BhP4GPk A3P6G65U5v70my/crPJV25UhHz5s8hDYRs2O8ifEmKNfL4Sam8frFevzd qQXpBg1zdM/2UoTyzogxi5EeqRDWPu0WVh4k9nvJ79wGtERhq+tVkkDHb Dl43vpYabvewdZqvEysFPBKMghjVL23VyLGGYml8kGdClCYxSj9mcxori A==; X-IronPort-AV: E=McAfee;i="6200,9189,10264"; a="234962525" X-IronPort-AV: E=Sophos;i="5.88,384,1635231600"; d="scan'208";a="234962525" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2022 18:23:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,384,1635231600"; d="scan'208";a="706084924" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.238.175.107]) by orsmga005.jf.intel.com with ESMTP; 20 Feb 2022 18:23:35 -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 v3] raw/ifpga: initialize scalar variable before using Date: Sun, 20 Feb 2022 21:20:19 -0500 Message-Id: <20220221022019.303075-1-wei.huang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220218032053.266035-1-wei.huang@intel.com> References: <20220218032053.266035-1-wei.huang@intel.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 Scalar variable sub_brg_bdf may be used uninitialized in function ifpga_rawdev_fill_info(). It is initialized now in this fix. 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 --- 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