Revision df0db221

b/hw/intel-hda.c
56 56
    if (dev->cad == -1) {
57 57
        dev->cad = bus->next_cad;
58 58
    }
59
    if (dev->cad > 15)
59
    if (dev->cad >= 15) {
60 60
        return -1;
61
    }
61 62
    bus->next_cad = dev->cad + 1;
62 63
    return info->init(dev);
63 64
}
......
643 644
    [ ICH6_REG_WAKEEN ] = {
644 645
        .name     = "WAKEEN",
645 646
        .size     = 2,
646
        .wmask    = 0x3fff,
647
        .wmask    = 0x7fff,
647 648
        .offset   = offsetof(IntelHDAState, wake_en),
648 649
        .whandler = intel_hda_set_wake_en,
649 650
    },
650 651
    [ ICH6_REG_STATESTS ] = {
651 652
        .name     = "STATESTS",
652 653
        .size     = 2,
653
        .wmask    = 0x3fff,
654
        .wclear   = 0x3fff,
654
        .wmask    = 0x7fff,
655
        .wclear   = 0x7fff,
655 656
        .offset   = offsetof(IntelHDAState, state_sts),
656 657
        .whandler = intel_hda_set_state_sts,
657 658
    },

Also available in: Unified diff