diff --git a/reactos/drivers/base/beep/beep.c b/reactos/drivers/base/beep/beep.c index 821084002a8..4e8bfcf023b 100644 --- a/reactos/drivers/base/beep/beep.c +++ b/reactos/drivers/base/beep/beep.c @@ -288,7 +288,7 @@ BeepUnload(IN PDRIVER_OBJECT DriverObject) IoDeleteDevice(DeviceObject); } -DRIVER_STARTIO BeepStartIo; + VOID NTAPI BeepStartIo(IN PDEVICE_OBJECT DeviceObject, @@ -303,7 +303,7 @@ BeepStartIo(IN PDEVICE_OBJECT DeviceObject, /* Acquire the cancel lock and make sure the IRP is valid */ IoAcquireCancelSpinLock(&CancelIrql); - if (!Irp) + if (Irp->Cancel) { /* It's not, release the lock and quit */ IoReleaseCancelSpinLock(CancelIrql);