VirtualBox

Changeset 25006 in vbox


Ignore:
Timestamp:
Nov 26, 2009 2:46:03 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55315
Message:

IOMR3IOPortDeregister: Fixed rc handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/IOM.cpp

    r20776 r25006  
    929929            else
    930930            {
    931                  /*
    932                   * Split the range, done.
    933                   */
     931                /*
     932                 * Split the range, done.
     933                 */
    934934                Assert(pRange->Core.KeyLast > PortLast && pRange->Core.Key < Port);
    935935                /* create tail. */
    936936                PIOMIOPORTRANGERC pRangeNew;
    937                 int rc = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
    938                 if (RT_FAILURE(rc))
     937                int rc2 = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
     938                if (RT_FAILURE(rc2))
    939939                {
    940940                    iomUnlock(pVM);
    941                     return rc;
     941                    return rc2;
    942942                }
    943943                *pRangeNew = *pRange;
     
    968968
    969969    /*
    970      * Remove any R0 ranges first.
    971      */
    972     rc = VINF_SUCCESS;
     970     * Remove any R0 ranges.
     971     */
    973972    Port = PortStart;
    974973    while (Port <= PortLast && Port >= PortStart)
     
    10131012            else
    10141013            {
    1015                  /*
    1016                   * Split the range, done.
    1017                   */
     1014                /*
     1015                 * Split the range, done.
     1016                 */
    10181017                Assert(pRange->Core.KeyLast > PortLast && pRange->Core.Key < Port);
    10191018                /* create tail. */
    10201019                PIOMIOPORTRANGER0 pRangeNew;
    1021                 int rc = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
    1022                 if (RT_FAILURE(rc))
     1020                int rc2 = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
     1021                if (RT_FAILURE(rc2))
    10231022                {
    10241023                    iomUnlock(pVM);
    1025                     return rc;
     1024                    return rc2;
    10261025                }
    10271026                *pRangeNew = *pRange;
     
    11011100                /* create tail. */
    11021101                PIOMIOPORTRANGER3 pRangeNew;
    1103                 int rc = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
    1104                 if (RT_FAILURE(rc))
     1102                int rc2 = MMHyperAlloc(pVM, sizeof(*pRangeNew), 0, MM_TAG_IOM, (void **)&pRangeNew);
     1103                if (RT_FAILURE(rc2))
    11051104                {
    11061105                    iomUnlock(pVM);
    1107                     return rc;
     1106                    return rc2;
    11081107                }
    11091108                *pRangeNew = *pRange;
Note: See TracChangeset for help on using the changeset viewer.

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