- Fix a broken loop

- Remove unnecessary checks
- Fixes CID 171, 172 and 655

svn path=/trunk/; revision=38075
This commit is contained in:
Stefan Ginsberg 2008-12-14 10:15:49 +00:00
parent afa4c210b2
commit a9295e691b

View file

@ -1733,7 +1733,7 @@ SpiCleanupAfterInit(PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
LunInfo = DeviceExtension->BusesConfig->BusScanInfo[Bus]->LunInfo; LunInfo = DeviceExtension->BusesConfig->BusScanInfo[Bus]->LunInfo;
while (!LunInfo) while (LunInfo)
{ {
/* Free current, but save pointer to the next one */ /* Free current, but save pointer to the next one */
Ptr = LunInfo->Next; Ptr = LunInfo->Next;
@ -1958,8 +1958,8 @@ ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType,
Lun); Lun);
/* This request should not be processed if */ /* This request should not be processed if */
if ((LunExtension && LunExtension->ReadyLun) || if ((LunExtension->ReadyLun) ||
(LunExtension && LunExtension->SrbInfo.Srb)) (LunExtension->SrbInfo.Srb))
{ {
/* Nothing to do here */ /* Nothing to do here */
break; break;
@ -2900,7 +2900,7 @@ ScsiPortStartIo(IN PDEVICE_OBJECT DeviceObject,
// Store the MDL virtual address in SrbInfo structure // Store the MDL virtual address in SrbInfo structure
SrbInfo->DataOffset = MmGetMdlVirtualAddress(Irp->MdlAddress); SrbInfo->DataOffset = MmGetMdlVirtualAddress(Irp->MdlAddress);
if (DeviceExtension->MapBuffers && Irp->MdlAddress) if (DeviceExtension->MapBuffers)
{ {
/* Calculate offset within DataBuffer */ /* Calculate offset within DataBuffer */
SrbInfo->DataOffset = MmGetSystemAddressForMdl(Irp->MdlAddress); SrbInfo->DataOffset = MmGetSystemAddressForMdl(Irp->MdlAddress);