Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213457
b: refs/heads/master
c: 807508c
h: refs/heads/master
i:
  213455: 079bfbe
v: v3
  • Loading branch information
Anton Vorontsov authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 1015598 commit 637a462
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 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: 5cfc64ceb6222aabec640ba76e89529a8fc2c1f0
refs/heads/master: 807508c8ff9af6ce8f25c5ca5f3eb06a8e7d3286
32 changes: 12 additions & 20 deletions trunk/drivers/base/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,17 +380,13 @@ struct platform_device *__init_or_module platform_device_register_resndata(

pdev->dev.parent = parent;

if (res) {
ret = platform_device_add_resources(pdev, res, num);
if (ret)
goto err;
}
ret = platform_device_add_resources(pdev, res, num);
if (ret)
goto err;

if (data) {
ret = platform_device_add_data(pdev, data, size);
if (ret)
goto err;
}
ret = platform_device_add_data(pdev, data, size);
if (ret)
goto err;

ret = platform_device_add(pdev);
if (ret) {
Expand Down Expand Up @@ -537,17 +533,13 @@ struct platform_device * __init_or_module platform_create_bundle(
goto err_out;
}

if (res) {
error = platform_device_add_resources(pdev, res, n_res);
if (error)
goto err_pdev_put;
}
error = platform_device_add_resources(pdev, res, n_res);
if (error)
goto err_pdev_put;

if (data) {
error = platform_device_add_data(pdev, data, size);
if (error)
goto err_pdev_put;
}
error = platform_device_add_data(pdev, data, size);
if (error)
goto err_pdev_put;

error = platform_device_add(pdev);
if (error)
Expand Down

0 comments on commit 637a462

Please sign in to comment.