cpuGetSubDriver already reports a useful error.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
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