mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 19:05:52 +00:00
[MOUCLASS] Only set the device interface state if we have an interface name
This commit is contained in:
parent
5414600e1e
commit
9638666d84
1 changed files with 4 additions and 2 deletions
|
@ -840,7 +840,8 @@ ClassPnp(
|
|||
}
|
||||
else
|
||||
DeviceExtension->FileHandle = NULL;
|
||||
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, TRUE);
|
||||
if (DeviceExtension->InterfaceName.Length != 0)
|
||||
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, TRUE);
|
||||
Irp->IoStatus.Status = Status;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return Status;
|
||||
|
@ -855,7 +856,8 @@ ClassPnp(
|
|||
break;
|
||||
|
||||
case IRP_MN_REMOVE_DEVICE:
|
||||
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, FALSE);
|
||||
if (DeviceExtension->InterfaceName.Length != 0)
|
||||
IoSetDeviceInterfaceState(&DeviceExtension->InterfaceName, FALSE);
|
||||
if (DeviceExtension->FileHandle)
|
||||
{
|
||||
ZwClose(DeviceExtension->FileHandle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue