Hi, > -----Original Message----- > From: Huang, Wei <[email protected]> > Sent: Monday, February 21, 2022 10:20 > To: [email protected]; Xu, Rosen <[email protected]>; Zhang, Qi Z > <[email protected]>; [email protected]; [email protected] > Cc: [email protected]; Zhang, Tianfei <[email protected]>; Yigit, Ferruh > <[email protected]>; Huang, Wei <[email protected]> > Subject: [PATCH v3] raw/ifpga: initialize scalar variable before using > > 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: [email protected] > > Signed-off-by: Wei Huang <[email protected]> > --- > 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
Acked-by: Rosen Xu <[email protected]>

