]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aha152x.c
[SCSI] aha152x: Fix oops on module removal
[linux-2.6-omap-h63xx.git] / drivers / scsi / aha152x.c
index f0c4ffceabbe168d8ede99a016efd6153d7dc186..1dca1775f4b14554213fc366b89433e78f2af11c 100644 (file)
@@ -3914,9 +3914,9 @@ static int __init aha152x_init(void)
 
 static void __exit aha152x_exit(void)
 {
-       struct aha152x_hostdata *hd;
+       struct aha152x_hostdata *hd, *tmp;
 
-       list_for_each_entry(hd, &aha152x_host_list, host_list) {
+       list_for_each_entry_safe(hd, tmp, &aha152x_host_list, host_list) {
                struct Scsi_Host *shost = container_of((void *)hd, struct Scsi_Host, hostdata);
 
                aha152x_release(shost);