g_autofree char *mdevPath = NULL;
const char *dev_str = NULL;
- if (!(mdevPath = virMediatedDeviceGetSysfsPath(mdevsrc->uuidstr)))
- return NULL;
-
+ mdevPath = virMediatedDeviceGetSysfsPath(mdevsrc->uuidstr);
dev_str = qemuBuildHostdevMdevModelTypeString(mdevsrc);
if (!dev_str)
g_autoptr(virMediatedDevice) dev = NULL;
g_autofree char *sysfspath = NULL;
- if (!(sysfspath = virMediatedDeviceGetSysfsPath(uuidstr)))
- return NULL;
-
+ sysfspath = virMediatedDeviceGetSysfsPath(uuidstr);
if (!virFileExists(sysfspath)) {
virReportError(VIR_ERR_DEVICE_MISSING,
_("mediated device '%s' not found"), uuidstr);
g_autofree char *iommu_path = NULL;
g_autofree char *dev_path = virMediatedDeviceGetSysfsPath(uuidstr);
- if (!dev_path)
- return NULL;
-
iommu_path = g_strdup_printf("%s/iommu_group", dev_path);
if (!virFileExists(iommu_path)) {