ntoskrnl.exe: Handle already-loaded drivers in handle_bus_relations().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-12-21 17:28:47 -06:00 committed by Alexandre Julliard
parent e3ad1cff73
commit d498780294
1 changed files with 4 additions and 1 deletions

View File

@ -3756,7 +3756,10 @@ static void handle_bus_relations( DEVICE_OBJECT *device )
strcpyW( buffer, servicesW );
strcatW( buffer, driver );
RtlInitUnicodeString( &string, buffer );
if (ZwLoadDriver( &string ) != STATUS_SUCCESS)
status = ZwLoadDriver( &string );
if (status == STATUS_IMAGE_ALREADY_LOADED)
return;
else if (status != STATUS_SUCCESS)
{
ERR_(plugplay)( "Failed to load driver %s\n", debugstr_w(driver) );
return;