]> Git Repo - qemu.git/commitdiff
qxl: disallow unknown revisions
authorAlon Levy <[email protected]>
Tue, 21 Aug 2012 10:51:32 +0000 (13:51 +0300)
committerGerd Hoffmann <[email protected]>
Wed, 5 Sep 2012 15:11:55 +0000 (17:11 +0200)
Signed-off-by: Alon Levy <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/qxl.c

index baf9bb4dfb67afbe606e8c85b056511dcd9e78be..d134a701decf59d860c43b428b71b8492007faa5 100644 (file)
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1798,10 +1798,13 @@ static int qxl_init_common(PCIQXLDevice *qxl)
         io_size = 16;
         break;
     case 3: /* qxl-3 */
-    default:
         pci_device_rev = QXL_DEFAULT_REVISION;
         io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
         break;
+    default:
+        error_report("Invalid revision %d for qxl device (max %d)",
+                     qxl->revision, QXL_DEFAULT_REVISION);
+        return -1;
     }
 
     pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev);
This page took 0.028151 seconds and 4 git commands to generate.