summaryrefslogtreecommitdiff
path: root/src/VBox/VMM/VMMR3/PDMDriver.cpp
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2015-09-10 10:25:41 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2015-09-10 10:25:41 +0000
commitf90ac723eb03fc01c71243e8dda509c61a0f82e5 (patch)
tree919045ca4aa28c5168d69b7bdace3288e3f1dbb6 /src/VBox/VMM/VMMR3/PDMDriver.cpp
parent0cef64f81782b8e75f38047e609372d1ae5ed812 (diff)
downloadVirtualBox-svn-f90ac723eb03fc01c71243e8dda509c61a0f82e5.tar.gz
VMM: check the return code
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@57684 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/VMM/VMMR3/PDMDriver.cpp')
-rw-r--r--src/VBox/VMM/VMMR3/PDMDriver.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/VBox/VMM/VMMR3/PDMDriver.cpp b/src/VBox/VMM/VMMR3/PDMDriver.cpp
index ee658f35737..b75b57ce925 100644
--- a/src/VBox/VMM/VMMR3/PDMDriver.cpp
+++ b/src/VBox/VMM/VMMR3/PDMDriver.cpp
@@ -683,7 +683,7 @@ int pdmR3DrvInstantiate(PVM pVM, PCFGMNODE pNode, PPDMIBASE pBaseInterface, PPDM
rc = MMHyperAlloc(pVM, cb, 64, MM_TAG_PDM_DRIVER, (void **)&pNew);
else
rc = MMR3HeapAllocZEx(pVM, MM_TAG_PDM_DRIVER, cb, (void **)&pNew);
- if (pNew)
+ if (RT_SUCCESS(rc))
{
/*
* Initialize the instance structure (declaration order).
@@ -774,10 +774,7 @@ int pdmR3DrvInstantiate(PVM pVM, PCFGMNODE pNode, PPDMIBASE pBaseInterface, PPDM
}
}
else
- {
- AssertMsgFailed(("Failed to allocate %d bytes for instantiating driver '%s'\n", cb, pszName));
- rc = VERR_NO_MEMORY;
- }
+ AssertMsgFailed(("Failed to allocate %d bytes for instantiating driver '%s'! rc=%Rrc\n", cb, pszName, rc));
}
else
AssertMsgFailed(("Failed to create Config node! rc=%Rrc\n", rc));