aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aha1542.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aha1542.c')
-rw-r--r--drivers/scsi/aha1542.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index adda750412f2..1b1adfb384cb 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -543,10 +543,8 @@ static void aha1542_intr_handle(struct Scsi_Host *shost, void *dev_id, struct pt
543 return; 543 return;
544 } 544 }
545 my_done = SCtmp->scsi_done; 545 my_done = SCtmp->scsi_done;
546 if (SCtmp->host_scribble) { 546 kfree(SCtmp->host_scribble);
547 kfree(SCtmp->host_scribble); 547 SCtmp->host_scribble = NULL;
548 SCtmp->host_scribble = NULL;
549 }
550 /* Fetch the sense data, and tuck it away, in the required slot. The 548 /* Fetch the sense data, and tuck it away, in the required slot. The
551 Adaptec automatically fetches it, and there is no guarantee that 549 Adaptec automatically fetches it, and there is no guarantee that
552 we will still have it in the cdb when we come back */ 550 we will still have it in the cdb when we come back */
@@ -1432,10 +1430,8 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt)
1432 HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) { 1430 HOSTDATA(SCpnt->host)->SCint[i]->target == SCpnt->target) {
1433 Scsi_Cmnd *SCtmp; 1431 Scsi_Cmnd *SCtmp;
1434 SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; 1432 SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
1435 if (SCtmp->host_scribble) { 1433 kfree(SCtmp->host_scribble);
1436 kfree(SCtmp->host_scribble); 1434 SCtmp->host_scribble = NULL;
1437 SCtmp->host_scribble = NULL;
1438 }
1439 HOSTDATA(SCpnt->host)->SCint[i] = NULL; 1435 HOSTDATA(SCpnt->host)->SCint[i] = NULL;
1440 HOSTDATA(SCpnt->host)->mb[i].status = 0; 1436 HOSTDATA(SCpnt->host)->mb[i].status = 0;
1441 } 1437 }
@@ -1495,10 +1491,8 @@ static int aha1542_bus_reset(Scsi_Cmnd * SCpnt)
1495 */ 1491 */
1496 continue; 1492 continue;
1497 } 1493 }
1498 if (SCtmp->host_scribble) { 1494 kfree(SCtmp->host_scribble);
1499 kfree(SCtmp->host_scribble); 1495 SCtmp->host_scribble = NULL;
1500 SCtmp->host_scribble = NULL;
1501 }
1502 HOSTDATA(SCpnt->device->host)->SCint[i] = NULL; 1496 HOSTDATA(SCpnt->device->host)->SCint[i] = NULL;
1503 HOSTDATA(SCpnt->device->host)->mb[i].status = 0; 1497 HOSTDATA(SCpnt->device->host)->mb[i].status = 0;
1504 } 1498 }
@@ -1565,10 +1559,8 @@ static int aha1542_host_reset(Scsi_Cmnd * SCpnt)
1565 */ 1559 */
1566 continue; 1560 continue;
1567 } 1561 }
1568 if (SCtmp->host_scribble) { 1562 kfree(SCtmp->host_scribble);
1569 kfree(SCtmp->host_scribble); 1563 SCtmp->host_scribble = NULL;
1570 SCtmp->host_scribble = NULL;
1571 }
1572 HOSTDATA(SCpnt->device->host)->SCint[i] = NULL; 1564 HOSTDATA(SCpnt->device->host)->SCint[i] = NULL;
1573 HOSTDATA(SCpnt->device->host)->mb[i].status = 0; 1565 HOSTDATA(SCpnt->device->host)->mb[i].status = 0;
1574 } 1566 }
@@ -1711,10 +1703,8 @@ static int aha1542_old_reset(Scsi_Cmnd * SCpnt, unsigned int reset_flags)
1711 Scsi_Cmnd *SCtmp; 1703 Scsi_Cmnd *SCtmp;
1712 SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; 1704 SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
1713 SCtmp->result = DID_RESET << 16; 1705 SCtmp->result = DID_RESET << 16;
1714 if (SCtmp->host_scribble) { 1706 kfree(SCtmp->host_scribble);
1715 kfree(SCtmp->host_scribble); 1707 SCtmp->host_scribble = NULL;
1716 SCtmp->host_scribble = NULL;
1717 }
1718 printk(KERN_WARNING "Sending DID_RESET for target %d\n", SCpnt->target); 1708 printk(KERN_WARNING "Sending DID_RESET for target %d\n", SCpnt->target);
1719 SCtmp->scsi_done(SCpnt); 1709 SCtmp->scsi_done(SCpnt);
1720 1710
@@ -1757,10 +1747,8 @@ fail:
1757 Scsi_Cmnd *SCtmp; 1747 Scsi_Cmnd *SCtmp;
1758 SCtmp = HOSTDATA(SCpnt->host)->SCint[i]; 1748 SCtmp = HOSTDATA(SCpnt->host)->SCint[i];
1759 SCtmp->result = DID_RESET << 16; 1749 SCtmp->result = DID_RESET << 16;
1760 if (SCtmp->host_scribble) { 1750 kfree(SCtmp->host_scribble);
1761 kfree(SCtmp->host_scribble); 1751 SCtmp->host_scribble = NULL;
1762 SCtmp->host_scribble = NULL;
1763 }
1764 printk(KERN_WARNING "Sending DID_RESET for target %d\n", SCpnt->target); 1752 printk(KERN_WARNING "Sending DID_RESET for target %d\n", SCpnt->target);
1765 SCtmp->scsi_done(SCpnt); 1753 SCtmp->scsi_done(SCpnt);
1766 1754