[PATCH 2/6] hidclass.sys: Return irp->IoStatus.Status consistently.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Tue Aug 3 10:28:26 CDT 2021
On 8/3/21 3:19 AM, Rémi Bernon wrote:
> @@ -584,15 +567,13 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
> FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n",
> code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3);
> irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
> - rc = STATUS_UNSUCCESSFUL;
> break;
> }
> }
>
> - if (rc != STATUS_PENDING)
> - IoCompleteRequest( irp, IO_NO_INCREMENT );
> + if (irp->IoStatus.Status != STATUS_PENDING) IoCompleteRequest( irp, IO_NO_INCREMENT );
>
> - return rc;
> + return irp->IoStatus.Status;
> }
>
> NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp)
You can't access the IRP after calling IoCompleteRequest().
There are other instances in this patch of the same thing.
More information about the wine-devel
mailing list