Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332737
b: refs/heads/master
c: 6f12f59
h: refs/heads/master
i:
  332735: 5eaa78d
v: v3
  • Loading branch information
Julia Lawall authored and David Woodhouse committed Sep 29, 2012
1 parent ec3bdce commit 02c4758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: fac0077cc0a1760f0afbac6526f56656ee025a34
refs/heads/master: 6f12f59a5f0dc014209bcc21d5689a6611e1c1e7
18 changes: 4 additions & 14 deletions trunk/drivers/mtd/maps/autcpu12-nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static int __devinit autcpu12_nvram_probe(struct platform_device *pdev)
map_word tmp, save0, save1;
struct resource *res;
struct autcpu12_nvram_priv *priv;
int err;

priv = devm_kzalloc(&pdev->dev,
sizeof(struct autcpu12_nvram_priv), GFP_KERNEL);
Expand All @@ -50,8 +49,7 @@ static int __devinit autcpu12_nvram_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "failed to get memory resource\n");
err = -ENOENT;
goto out;
return -ENOENT;
}

priv->map.bankwidth = 4;
Expand All @@ -61,8 +59,7 @@ static int __devinit autcpu12_nvram_probe(struct platform_device *pdev)
strcpy((char *)priv->map.name, res->name);
if (!priv->map.virt) {
dev_err(&pdev->dev, "failed to remap mem resource\n");
err = -EBUSY;
goto out;
return -EBUSY;
}

simple_map_init(&priv->map);
Expand Down Expand Up @@ -90,8 +87,7 @@ static int __devinit autcpu12_nvram_probe(struct platform_device *pdev)
priv->mtd = do_map_probe("map_ram", &priv->map);
if (!priv->mtd) {
dev_err(&pdev->dev, "probing failed\n");
err = -ENXIO;
goto out;
return -ENXIO;
}

priv->mtd->owner = THIS_MODULE;
Expand All @@ -106,12 +102,7 @@ static int __devinit autcpu12_nvram_probe(struct platform_device *pdev)

map_destroy(priv->mtd);
dev_err(&pdev->dev, "NV-RAM device addition failed\n");
err = -ENOMEM;

out:
devm_kfree(&pdev->dev, priv);

return err;
return -ENOMEM;
}

static int __devexit autcpu12_nvram_remove(struct platform_device *pdev)
Expand All @@ -120,7 +111,6 @@ static int __devexit autcpu12_nvram_remove(struct platform_device *pdev)

mtd_device_unregister(priv->mtd);
map_destroy(priv->mtd);
devm_kfree(&pdev->dev, priv);

return 0;
}
Expand Down

0 comments on commit 02c4758

Please sign in to comment.