DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] raw/ifpga: initialize scalar variable before using
@ 2022-02-18  3:09 Wei Huang
  2022-02-18  3:20 ` [PATCH v2] " Wei Huang
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Huang @ 2022-02-18  3:09 UTC (permalink / raw)
  To: dev, rosen.xu, qi.z.zhang, nipun.gupta, hemant.agrawal
  Cc: stable, tianfei.zhang, ferruh.yigit, Wei Huang

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 <wei.huang@intel.com>
---
 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-07 22:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18  3:09 [PATCH v1] raw/ifpga: initialize scalar variable before using Wei Huang
2022-02-18  3:20 ` [PATCH v2] " Wei Huang
2022-02-21  2:20   ` [PATCH v3] " Wei Huang
2022-02-21  2:46     ` Xu, Rosen
2022-02-21  6:34     ` [PATCH v4] " Wei Huang
2022-02-21  7:52       ` [PATCH v5] " Wei Huang
2022-02-28  7:58         ` Zhang, Tianfei
2022-03-07 22:13           ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).