diff options
author | Herbert Valerio Riedel <hvr@inso.tuwien.ac.at> | 2005-01-17 13:47:24 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 11:19:46 +0200 |
commit | 8ea2e06fc8d2f03b49cef7732ae8e290e2f0b183 (patch) | |
tree | 455074eed205d8791f685795ec0b3833f54448e1 /drivers/mtd/ftl.c | |
parent | 14f8351a313f364afbc565f1ddcd43f8cfdccf52 (diff) | |
download | talos-obmc-linux-8ea2e06fc8d2f03b49cef7732ae8e290e2f0b183.tar.gz talos-obmc-linux-8ea2e06fc8d2f03b49cef7732ae8e290e2f0b183.zip |
[MTD] FTL Fix missing pointer assignment
For the case that mtd partitions are enabled it would cause a 0-pointer
dereferencing in mtdpart.c:mtd_erase_callback()
Signed-off-by: Herbert Valerio Riedel <hvr@inso.tuwien.ac.at>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/ftl.c')
-rw-r--r-- | drivers/mtd/ftl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 18cc8846e733..d9ab60b36fd4 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -1,5 +1,5 @@ /* This version ported to the Linux-MTD system by dwmw2@infradead.org - * $Id: ftl.c,v 1.54 2004/11/16 18:33:15 dwmw2 Exp $ + * $Id: ftl.c,v 1.55 2005/01/17 13:47:21 hvr Exp $ * * Fixes: Arnaldo Carvalho de Melo <acme@conectiva.com.br> * - fixes some leaks on failure in build_maps and ftl_notify_add, cleanups @@ -357,6 +357,7 @@ static int erase_xfer(partition_t *part, if (!erase) return -ENOMEM; + erase->mtd = part->mbd.mtd; erase->callback = ftl_erase_callback; erase->addr = xfer->Offset; erase->len = 1 << part->header.EraseUnitSize; @@ -1096,7 +1097,7 @@ struct mtd_blktrans_ops ftl_tr = { int init_ftl(void) { - DEBUG(0, "$Id: ftl.c,v 1.54 2004/11/16 18:33:15 dwmw2 Exp $\n"); + DEBUG(0, "$Id: ftl.c,v 1.55 2005/01/17 13:47:21 hvr Exp $\n"); return register_mtd_blktrans(&ftl_tr); } |