Skip to content

Commit

Permalink
qxl: disallow unknown revisions
Browse files Browse the repository at this point in the history
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
Alon Levy authored and kraxel committed Sep 5, 2012
1 parent 511b13e commit 36839d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hw/qxl.c
Expand Up @@ -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);
Expand Down

0 comments on commit 36839d3

Please sign in to comment.