patch-2.4.2 linux/drivers/mtd/cfi_cmdset_0001.c

Next file: linux/drivers/mtd/cfi_cmdset_0002.c
Previous file: linux/drivers/media/video/zr36120.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/mtd/cfi_cmdset_0001.c linux/drivers/mtd/cfi_cmdset_0001.c
@@ -15,7 +15,7 @@
 #include <asm/byteorder.h>
 
 #include <linux/errno.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/cfi.h>
@@ -816,13 +816,13 @@
 			 * as the whole point is that nobody can do anything
 			 * with the chip now anyway.
 			 */
-			spin_unlock_bh(chip->mutex);
 			break;
 
 		default:
 			ret = -EAGAIN;
 			break;
 		}
+		spin_unlock_bh(chip->mutex);
 	}
 
 	/* Unlock the chips again */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)