VirtualBox

Changeset 82303 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Nov 30, 2019 6:24:28 PM (5 years ago)
Author:
vboxsync
Message:

DevHDA: Try more consistently to check status codes before using loaded state. bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHDA.cpp

    r82302 r82303  
    39143914    uint32_t cRegs;
    39153915    rc = pHlp->pfnSSMGetU32(pSSM, &cRegs); AssertRCReturn(rc, rc);
     3916    AssertRCReturn(rc, rc);
    39163917    if (cRegs != RT_ELEMENTS(pThis->au32Regs))
    39173918        LogRel(("HDA: SSM version cRegs is %RU32, expected %RU32\n", cRegs, RT_ELEMENTS(pThis->au32Regs)));
     
    39203921    {
    39213922        pHlp->pfnSSMGetMem(pSSM, pThis->au32Regs, sizeof(pThis->au32Regs));
    3922         pHlp->pfnSSMSkip(pSSM, sizeof(uint32_t) * (cRegs - RT_ELEMENTS(pThis->au32Regs)));
     3923        rc = pHlp->pfnSSMSkip(pSSM, sizeof(uint32_t) * (cRegs - RT_ELEMENTS(pThis->au32Regs)));
     3924        AssertRCReturn(rc, rc);
    39233925    }
    39243926    else
    3925         pHlp->pfnSSMGetMem(pSSM, pThis->au32Regs, sizeof(uint32_t) * cRegs);
     3927    {
     3928        rc = pHlp->pfnSSMGetMem(pSSM, pThis->au32Regs, sizeof(uint32_t) * cRegs);
     3929        AssertRCReturn(rc, rc);
     3930    }
    39263931
    39273932    /* Make sure to update the base addresses first before initializing any streams down below. */
     
    39413946    {
    39423947        rc = pHlp->pfnSSMGetU64(pSSM, &pThis->u64WalClk);
    3943         AssertRCReturn(rc, rc);
    39443948        rc = pHlp->pfnSSMGetU8(pSSM, &pThis->u8IRQL);
    39453949        AssertRCReturn(rc, rc);
     
    40054009         * Load period state.
    40064010         */
    4007         hdaR3StreamPeriodInit(&pStream->State.Period,
    4008                               pStream->u8SD, pStream->u16LVI, pStream->u32CBL, &pStream->State.Cfg);
     4011        hdaR3StreamPeriodInit(&pStream->State.Period, pStream->u8SD, pStream->u16LVI, pStream->u32CBL, &pStream->State.Cfg);
    40094012
    40104013        rc = pHlp->pfnSSMGetStructEx(pSSM, &pStream->State.Period, sizeof(HDASTREAMPERIOD),
     
    40164019         */
    40174020        uint32_t cbCircBufSize = 0;
    4018         rc = pHlp->pfnSSMGetU32(pSSM, &cbCircBufSize); /* cbCircBuf */
     4021        pHlp->pfnSSMGetU32(pSSM, &cbCircBufSize); /* cbCircBuf */
    40194022        uint32_t cbCircBufUsed = 0;
    40204023        rc = pHlp->pfnSSMGetU32(pSSM, &cbCircBufUsed); /* cbCircBuf */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette