diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -662,7 +662,12 @@ snprintf(value, sizeof(value), "%d", func); set_config_value_node(nvl, "func", value); - return (pci_parse_legacy_config(nvl, strchr(opts, ','))); + opts = strchr(opts, ','); + if (opts == NULL) { + return (0); + } + + return pci_parse_legacy_config(nvl, opts + 1); } static int