Commit d4987802 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

parent e3ad1cff
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment