[UMPNPMGR] PNP_CreateDevInst: Do not create a normal device if it is already present

This commit is contained in:
Eric Kohl 2022-04-23 15:35:45 +02:00
parent b0b925d2b0
commit 33a0c66f30

View file

@ -3097,6 +3097,13 @@ PNP_CreateDevInst(
}
else
{
/* Fail, if the device exists and is present */
if ((hKey != NULL) && (IsPresentDeviceInstanceID(pszDeviceID)))
{
ret = CR_ALREADY_SUCH_DEVINST;
goto done;
}
/* Create the device instance */
ret = CreateDeviceInstance(pszDeviceID, FALSE);
}