[PATCH 18/41] cpu: Don't overwrite errors in cpuGetModels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cpuGetSubDriver already reports a useful error.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/cpu/cpu.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
index d2b7ce3..fae3885 100644
--- a/src/cpu/cpu.c
+++ b/src/cpu/cpu.c
@@ -765,13 +765,8 @@ cpuGetModels(virArch arch, char ***models)
 
     VIR_DEBUG("arch=%s", virArchToString(arch));
 
-    driver = cpuGetSubDriver(arch);
-    if (driver == NULL) {
-        virReportError(VIR_ERR_INVALID_ARG,
-                       _("cannot find a driver for the architecture %s"),
-                       virArchToString(arch));
+    if (!(driver = cpuGetSubDriver(arch)))
         return -1;
-    }
 
     if (!driver->getModels) {
         if (models)
-- 
2.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]