[PATCH] nand-bb: Fix remove of nand-bb device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed possible crashs if nand-bb device is removed
and the list entry was not deleted from the list.

Signed-off-by: Juergen Kilb <J.Kilb@xxxxxxxxx>
---
 drivers/mtd/nand/nand-bb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
index cdb4663..0292f2f 100644
--- a/drivers/mtd/nand/nand-bb.c
+++ b/drivers/mtd/nand/nand-bb.c
@@ -314,6 +314,7 @@ int dev_remove_bb_dev(const char *name)
 		if (!strcmp(bb->cdev.name, name)) {
 			devfs_remove(&bb->cdev);
 			cdev_close(bb->cdev_parent);
+			list_del_init(&bb->list);
 			free(bb);
 			return 0;
 		}
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux