g_strdup_printf() is guaranteed to return a non-NULL value, so remove the unnecessary check for NULL. Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- src/util/virmdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index 7f4a499536..102eb2bf67 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -208,9 +208,6 @@ virMediatedDeviceGetIOMMUGroupDev(const char *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)) { -- 2.26.3