aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdswap.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2011-06-10 08:46:48 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:46:57 -0400
commit5be5758c114b18260c6fd4c8373bf89e39b0fe82 (patch)
tree54390f904df6ff11e570f764c444356cf2709fda /drivers/mtd/mtdswap.c
parent71f66a6580c4e42df377bebbcca5c72661a40700 (diff)
parent7f45e5cd1718ed769295033ca214032848a0097d (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patches against new code I have in queue.
Diffstat (limited to 'drivers/mtd/mtdswap.c')
-rw-r--r--drivers/mtd/mtdswap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index fed215c4cfa1..fd7885327611 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1450,7 +1450,13 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
1450 } 1450 }
1451 1451
1452 oinfo = mtd->ecclayout; 1452 oinfo = mtd->ecclayout;
1453 if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) { 1453 if (!oinfo) {
1454 printk(KERN_ERR "%s: mtd%d does not have OOB\n",
1455 MTDSWAP_PREFIX, mtd->index);
1456 return;
1457 }
1458
1459 if (!mtd->oobsize || oinfo->oobavail < MTDSWAP_OOBSIZE) {
1454 printk(KERN_ERR "%s: Not enough free bytes in OOB, " 1460 printk(KERN_ERR "%s: Not enough free bytes in OOB, "
1455 "%d available, %zu needed.\n", 1461 "%d available, %zu needed.\n",
1456 MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE); 1462 MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE);