Skip to content

Commit

Permalink
raw/ifpga: fix variable initialization in probing
Browse files Browse the repository at this point in the history
[ upstream commit aae56ac ]

Scalar variable sub_brg_bdf may be used uninitialized in function
ifpga_rawdev_fill_info(). It is initialized now in this fix.

Coverity issue: 375805
Fixes: 9c006c4 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
  • Loading branch information
weihuan2 authored and bluca committed Mar 9, 2022
1 parent 80b4931 commit c229799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/raw/ifpga/ifpga_rawdev.c
Expand Up @@ -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}};
int point;
DIR *dp = NULL;
struct dirent *entry;
Expand Down

0 comments on commit c229799

Please sign in to comment.