Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165448
b: refs/heads/master
c: ad4fbc7
h: refs/heads/master
v: v3
  • Loading branch information
vimal singh authored and David Woodhouse committed Sep 4, 2009
1 parent d1e0a3d commit f38c597
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 9a73290d7735c0671d1d2379ed40025db8b773d0
refs/heads/master: ad4fbc7921bd7cca108ecc1340a014e91ecc8536
13 changes: 7 additions & 6 deletions trunk/drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,22 @@ static int __devinit of_flash_probe(struct of_device *dev,
dev_err(&dev->dev, "Malformed reg property on %s\n",
dev->node->full_name);
err = -EINVAL;
goto err_out;
goto err_flash_remove;
}
count /= reg_tuple_size;

err = -ENOMEM;
info = kzalloc(sizeof(struct of_flash) +
sizeof(struct of_flash_list) * count, GFP_KERNEL);
if (!info)
goto err_out;

mtd_list = kzalloc(sizeof(struct mtd_info) * count, GFP_KERNEL);
if (!info)
goto err_out;
goto err_flash_remove;

dev_set_drvdata(&dev->dev, info);

mtd_list = kzalloc(sizeof(struct mtd_info) * count, GFP_KERNEL);
if (!mtd_list)
goto err_flash_remove;

for (i = 0; i < count; i++) {
err = -ENXIO;
if (of_address_to_resource(dp, i, &res)) {
Expand Down Expand Up @@ -339,6 +339,7 @@ static int __devinit of_flash_probe(struct of_device *dev,

err_out:
kfree(mtd_list);
err_flash_remove:
of_flash_remove(dev);

return err;
Expand Down

0 comments on commit f38c597

Please sign in to comment.