pci_emul_dior(): fix uninitialized scalar variable.

Prevent from returning an unitialized value in case the
ior size is unknown.

CID:		1194319
Reviewed by:	grehan
This commit is contained in:
Pedro F. Giffuni 2016-03-31 19:07:03 +00:00
parent 905197505e
commit 6e43f3ed6d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297472

View File

@ -2054,6 +2054,7 @@ pci_emul_dior(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx,
return (0);
}
value = 0;
if (size == 1) {
value = sc->ioregs[offset];
} else if (size == 2) {