*                       Frank Pavlic (pavlic@de.ibm.com) and
  *                       Martin Schwidefsky <schwidefsky@de.ibm.com>
  *
- *    $Revision: 1.96 $         $Date: 2004/11/11 13:42:33 $
+ *    $Revision: 1.97 $         $Date: 2005/03/31 09:42:02 $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 /**
  * initialization string for output
  */
-#define VERSION_LCS_C  "$Revision: 1.96 $"
+#define VERSION_LCS_C  "$Revision: 1.97 $"
 
 static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
 static char debug_buffer[255];
                }
        }
        /* re-insert all entries from the failed_list into ipm_list */
-       list_for_each_entry(ipm, &failed_list, list) {
+       list_for_each_entry_safe(ipm, tmp, &failed_list, list) {
                list_del_init(&ipm->list);
                list_add_tail(&ipm->list, &card->ipm_list);
        }