diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b456fedd5abd366a2fa19beb1ae14b24e1ca014c..01010639fb9820a21bb3c1925c4c9400f730cfe1 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -773,13 +773,12 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn, virDomainDiskDefPtr disk = dev->data.disk; virDomainDiskDefPtr orig_disk = NULL; int ret = -1; - const char *driverName = virDomainDiskGetDriver(disk); const char *src = virDomainDiskGetSource(disk); - if (driverName && STRNEQ(driverName, "qemu")) { + if (STRNEQ_NULLABLE(virDomainDiskGetDriver(disk), "qemu")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported driver name '%s' for disk '%s'"), - driverName, src); + virDomainDiskGetDriver(disk), src); goto end; }