From ff664bf817e5ad98551d3945dcc97fb05fa3a23d Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 22 Sep 2021 23:00:38 -0500 Subject: [PATCH] ndis.sys: Return the IOSB status from ndis_ioctl(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51757 Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/ndis.sys/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ndis.sys/main.c b/dlls/ndis.sys/main.c index 94c19ffca53..e1517f77700 100644 --- a/dlls/ndis.sys/main.c +++ b/dlls/ndis.sys/main.c @@ -98,6 +98,7 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); MIB_IF_ROW2 *netdev = device->DeviceExtension; + NTSTATUS status; TRACE( "ioctl %x insize %u outsize %u\n", irpsp->Parameters.DeviceIoControl.IoControlCode, @@ -115,8 +116,9 @@ static NTSTATUS WINAPI ndis_ioctl(DEVICE_OBJECT *device, IRP *irp) break; } + status = irp->IoStatus.u.Status; IoCompleteRequest( irp, IO_NO_INCREMENT ); - return STATUS_SUCCESS; + return status; } static void add_key(const WCHAR *guidstrW, const MIB_IF_ROW2 *netdev)