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

Next file: linux/drivers/mtd/vmax301.c
Previous file: linux/drivers/mtd/rpxlite.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.1/linux/drivers/mtd/slram.c linux/drivers/mtd/slram.c
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/ptrace.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/major.h>
@@ -200,6 +200,7 @@
 	if (add_mtd_device(mymtd))
 	{
 		printk("Failed to register new device\n");
+	        iounmap(((struct mypriv *)mymtd->priv)->start);
 		kfree(mymtd->priv);
 		kfree(mymtd);
 		return -EAGAIN;

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