Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332070
b: refs/heads/master
c: 6ac4262
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Sep 10, 2012
1 parent 7eb96db commit 3491f45
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 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: dbd4e51cd164e7d94b00c0c0dd3ac5517364a8fb
refs/heads/master: 6ac4262f367fd0d9b0219dfd014ffcca4a6cfa6a
25 changes: 8 additions & 17 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,22 +1655,20 @@ static int fsi_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (!res || (int)irq <= 0) {
dev_err(&pdev->dev, "Not enough FSI platform resources.\n");
ret = -ENODEV;
goto exit;
return -ENODEV;
}

master = kzalloc(sizeof(*master), GFP_KERNEL);
master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
if (!master) {
dev_err(&pdev->dev, "Could not allocate master\n");
ret = -ENOMEM;
goto exit;
return -ENOMEM;
}

master->base = ioremap_nocache(res->start, resource_size(res));
master->base = devm_ioremap_nocache(&pdev->dev,
res->start, resource_size(res));
if (!master->base) {
ret = -ENXIO;
dev_err(&pdev->dev, "Unable to ioremap FSI registers.\n");
goto exit_kfree;
return -ENXIO;
}

/* master setting */
Expand All @@ -1686,7 +1684,7 @@ static int fsi_probe(struct platform_device *pdev)
ret = fsi_stream_probe(&master->fsia, &pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "FSIA stream probe failed\n");
goto exit_iounmap;
return ret;
}

/* FSI B setting */
Expand Down Expand Up @@ -1734,11 +1732,7 @@ static int fsi_probe(struct platform_device *pdev)
fsi_stream_remove(&master->fsib);
exit_fsia:
fsi_stream_remove(&master->fsia);
exit_iounmap:
iounmap(master->base);
exit_kfree:
kfree(master);
exit:

return ret;
}

Expand All @@ -1757,9 +1751,6 @@ static int fsi_remove(struct platform_device *pdev)
fsi_stream_remove(&master->fsia);
fsi_stream_remove(&master->fsib);

iounmap(master->base);
kfree(master);

return 0;
}

Expand Down

0 comments on commit 3491f45

Please sign in to comment.