浏览代码

[SCSI] esp: Fix bug in esp_remove_common.

Do not try to kfree(esp), scsi_host_put() takes care of that.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 19 年之前
父节点
当前提交
7bd5ed5dd4
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      drivers/scsi/esp.c

+ 1 - 4
drivers/scsi/esp.c

@@ -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;
 }