Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252504
b: refs/heads/master
c: 8d8f26e
h: refs/heads/master
v: v3
  • Loading branch information
Maxin B. John authored and David Woodhouse committed May 25, 2011
1 parent 3633917 commit 2bc40c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c8d2607756a63ddf5b2f2dd368851b8febe4e72
refs/heads/master: 8d8f26e19cae48541b824f164021e1ff05067f8c
8 changes: 7 additions & 1 deletion trunk/drivers/mtd/mtdswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,13 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
}

oinfo = mtd->ecclayout;
if (!mtd->oobsize || !oinfo || oinfo->oobavail < MTDSWAP_OOBSIZE) {
if (!oinfo) {
printk(KERN_ERR "%s: mtd%d does not have OOB\n",
MTDSWAP_PREFIX, mtd->index);
return;
}

if (!mtd->oobsize || oinfo->oobavail < MTDSWAP_OOBSIZE) {
printk(KERN_ERR "%s: Not enough free bytes in OOB, "
"%d available, %zu needed.\n",
MTDSWAP_PREFIX, oinfo->oobavail, MTDSWAP_OOBSIZE);
Expand Down

0 comments on commit 2bc40c8

Please sign in to comment.