Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282830
b: refs/heads/master
c: b49e345
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and David Woodhouse committed Jan 9, 2012
1 parent f09bbbb commit 4fdef76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 5d3667eee40a88f79f7f826f0b4c3c9647d7ea7a
refs/heads/master: b49e345e61a2e0c4decbe9b1bd670ed5599fac6e
21 changes: 12 additions & 9 deletions trunk/drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2027,21 +2027,24 @@ static int __init docg3_probe(struct platform_device *pdev)
if (!docg3_bch)
goto nomem2;

ret = 0;
for (floor = 0; floor < DOC_MAX_NBFLOORS; floor++) {
mtd = doc_probe_device(base, floor, dev);
if (floor == 0 && !mtd)
goto notfound;
if (!IS_ERR_OR_NULL(mtd))
ret = mtd_device_parse_register(mtd, part_probes,
NULL, NULL, 0);
else
if (IS_ERR(mtd)) {
ret = PTR_ERR(mtd);
goto err_probe;
}
if (!mtd) {
if (floor == 0)
goto notfound;
else
continue;
}
docg3_floors[floor] = mtd;
ret = mtd_device_parse_register(mtd, part_probes, NULL, NULL,
0);
if (ret)
goto err_probe;
if (mtd)
found++;
found++;
}

ret = doc_register_sysfs(pdev, docg3_floors);
Expand Down

0 comments on commit 4fdef76

Please sign in to comment.