Skip to contentSkip to conversation

nand-bb: Fix remove of nand-bb device.

PATCH Applied Juergen Kilb 2 participants 2 messages Nov 19, 2012 – Nov 20, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nand-bb: Fix remove of nand-bb device.

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

---
 drivers/mtd/nand/nand-bb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand-bb.c +1 -0
index cdb4663..0292f2f 100644
@@ -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;
 		}
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 4 lines · Juergen Kilb

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

Applied, thanks

Sascha

Quoted 20 lines
---
 drivers/mtd/nand/nand-bb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mtd/nand/nand-bb.c +1 -0
index cdb4663..0292f2f 100644
@@ -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;
 		}
Signature · 1 line
1.7.0.4
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox