]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] esp: Fix bug in esp_remove_common.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sat, 24 Jun 2006 04:58:34 +0000 (21:58 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sat, 24 Jun 2006 06:16:13 +0000 (23:16 -0700)
Do not try to kfree(esp), scsi_host_put() takes care of that.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/scsi/esp.c

index 8e8fc43c1d227c568f9f274ad625b8bc7f8fd72b..ddb512463b457f64041854c28d2e51b58e0e9fbf 100644 (file)
@@ -1120,9 +1120,6 @@ static int __devexit esp_remove_common(struct esp *esp)
 
        scsi_remove_host(esp->ehost);
 
-       scsi_host_put(esp->ehost);
-       esp->ehost = NULL;
-
        ESP_INTSOFF(esp->dregs);
 #if 0
        esp_reset_dma(esp);
@@ -1135,7 +1132,7 @@ static int __devexit esp_remove_common(struct esp *esp)
        sbus_iounmap(esp->eregs, ESP_REG_SIZE);
        esp->dma->allocated = 0;
 
-       kfree(esp);
+       scsi_host_put(esp->ehost);
 
        return 0;
 }