dm: pci: minor bug fix about uninitialized local variable

'error' might be used uninitialized in cfginitbar. So initialize it to zero
at the beginning.

Tracked-On: #6284
Signed-off-by: Fei Li <fei1.li@intel.com>
This commit is contained in:
Fei Li 2021-09-09 10:53:48 +08:00 committed by wenlingz
parent 2913395123
commit a5541a9011
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ static inline int ptdev_msix_pba_bar(struct passthru_dev *ptdev)
static int
cfginitbar(struct vmctx *ctx, struct passthru_dev *ptdev)
{
int i, error;
int i, error = 0;
struct pci_vdev *dev;
struct pci_bar_io bar;
enum pcibar_type bartype;