Release the controller object if media detection fails.

svn path=/trunk/; revision=6416
This commit is contained in:
Eric Kohl 2003-10-23 18:48:13 +00:00
parent 56605f5a0b
commit 9bb05f0dc5

View file

@ -198,6 +198,8 @@ FloppyDpcDetectMedia(PKDPC Dpc,
if( ControllerExtension->St1 != 0 )
{
DPRINT1( "Read ID failed: ST1 = %2x\n", ControllerExtension->St1 );
IoFreeController( Controller );
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_DEVICE_NOT_READY;
IoCompleteRequest( Irp, 0 );
return;