summaryrefslogtreecommitdiffstats
path: root/hw/pci-host/pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-host/pam.c')
-rw-r--r--hw/pci-host/pam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c
index a496205783..454dd120db 100644
--- a/hw/pci-host/pam.c
+++ b/hw/pci-host/pam.c
@@ -62,7 +62,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory,
void pam_update(PAMMemoryRegion *pam, int idx, uint8_t val)
{
- assert(0 <= idx && idx <= 12);
+ assert(0 <= idx && idx < PAM_REGIONS_COUNT);
memory_region_set_enabled(&pam->alias[pam->current], false);
pam->current = (val >> ((!(idx & 1)) * 4)) & PAM_ATTR_MASK;