[PATCH] 2.4.27 - MTD cfi_cmdset_0002.c - Duplicate cleanup in error path

From: bradgoodman.com
Date: Fri Jul 23 2004 - 14:44:39 EST


Patch to 2.4.x: Corrects an obvious error where all of the cleanups are done
twice in the event of a chip programming error. This can result in
kernel BUG() getting called on subsequent programming attempts.


--- linux-2.4.22.prepatch/drivers/mtd/chips/cfi_cmdset_0002.c Fri Jun 13 10:51:34 2003
+++ linux-2.4.22/drivers/mtd/chips/cfi_cmdset_0002.new Thu Jul 15 14:44:30 2004
@@ -549,11 +549,6 @@
}
} else {
printk(KERN_WARNING "Waiting for write to complete timed out in do_write_oneword.");
-
- chip->state = FL_READY;
- wake_up(&chip->wq);
- cfi_spin_unlock(chip->mutex);
- DISABLE_VPP(map);
ret = -EIO;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/