bhyve: avoid uninitialized variable

Reviewed by:	markj
Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reported-by: Andy Fiddaman <andy@omniosce.org>
Differential Revision:	https://reviews.freebsd.org/D34688
This commit is contained in:
Corvin Köhne 2022-04-01 10:19:53 +02:00 committed by Emmanuel Vadot
parent 45ddbf2112
commit 8ac8adda8d

View file

@ -825,6 +825,8 @@ pci_emul_assign_bar(struct pci_devinst *const pdi, const int idx,
error = pci_emul_alloc_resource(baseptr, limit, size, &addr);
if (error != 0)
return (error);
} else {
addr = 0;
}
pdi->pi_bar[idx].type = type;