[PATCH 2/6] hidclass.sys: Return irp->IoStatus.Status consistently.

Rémi Bernon rbernon at codeweavers.com
Tue Aug 3 11:27:26 CDT 2021


On 8/3/21 5:28 PM, Zebediah Figura (she/her) wrote:
> 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.
> 

Ah thanks I wasn't aware of this, I think some previous patches 
introduced some as well. I'll fix these and resend the series.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list