git: bcab868a650e - main - bhyve: Style fix for read/write_config.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 17 Aug 2022 17:02:20 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=bcab868a650e56d1b452903a1bf23993cf539c2e

commit bcab868a650e56d1b452903a1bf23993cf539c2e
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-08-17 17:00:09 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-08-17 17:00:09 +0000

    bhyve: Style fix for read/write_config.
---
 usr.sbin/bhyve/pci_passthru.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index e244915773be..2b2f240fafe3 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -143,12 +143,12 @@ pcifd_init(void)
 uint32_t
 read_config(const struct pcisel *sel, long reg, int width)
 {
+	struct pci_io pi;
+
 	if (pcifd < 0 && pcifd_init()) {
 		return (0);
 	}
 
-	struct pci_io pi;
-
 	bzero(&pi, sizeof(pi));
 	pi.pi_sel = *sel;
 	pi.pi_reg = reg;
@@ -163,12 +163,12 @@ read_config(const struct pcisel *sel, long reg, int width)
 void
 write_config(const struct pcisel *sel, long reg, int width, uint32_t data)
 {
+	struct pci_io pi;
+
 	if (pcifd < 0 && pcifd_init()) {
 		return;
 	}
 
-	struct pci_io pi;
-
 	bzero(&pi, sizeof(pi));
 	pi.pi_sel = *sel;
 	pi.pi_reg = reg;