Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106451
b: refs/heads/master
c: f636ffb
h: refs/heads/master
i:
  106449: e47edbe
  106447: 6add11e
v: v3
  • Loading branch information
Atsushi Nemoto authored and David Woodhouse committed Jul 25, 2008
1 parent 388bd91 commit e080b72
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 6910c1368104d50e6b6afc6c8b7e9d1670a374e7
refs/heads/master: f636ffb420f0f9059c1d0b841afd691657246ad6
4 changes: 3 additions & 1 deletion trunk/drivers/mtd/mtdpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,12 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,

/* let's do some sanity checks */
if (slave->offset >= master->size) {
/* let's register it anyway to preserve ordering */
/* let's register it anyway to preserve ordering */
slave->offset = 0;
slave->mtd.size = 0;
printk(KERN_ERR"mtd: partition \"%s\" is out of reach -- disabled\n",
part->name);
goto out_register;
}
if (slave->offset + slave->mtd.size > master->size) {
slave->mtd.size = master->size - slave->offset;
Expand Down Expand Up @@ -475,6 +476,7 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
}
}

out_register:
if (part->mtdp) {
/* store the object pointer (caller may or may not register it*/
*part->mtdp = &slave->mtd;
Expand Down

0 comments on commit e080b72

Please sign in to comment.