diff --git a/usr.sbin/bhyve/tpm_device.c b/usr.sbin/bhyve/tpm_device.c --- a/usr.sbin/bhyve/tpm_device.c +++ b/usr.sbin/bhyve/tpm_device.c @@ -7,6 +7,7 @@ #include +#include #include #include #include @@ -54,7 +55,8 @@ } value = get_config_value_node(nvl, "version"); - if (value == NULL || strcmp(value, "2.0")) { + assert(value != NULL); + if (strcmp(value, "2.0")) { warnx("%s: unsupported tpm version %s", __func__, value); error = EINVAL; goto err_out;