diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index d45cbfdb4be6..f0388058b7da 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -391,10 +391,8 @@ omap_device_copy_resources(struct omap_hwmod *oh, | |||
391 | const char *name; | 391 | const char *name; |
392 | int error, irq = 0; | 392 | int error, irq = 0; |
393 | 393 | ||
394 | if (!oh || !oh->od || !oh->od->pdev) { | 394 | if (!oh || !oh->od || !oh->od->pdev) |
395 | error = -EINVAL; | 395 | return -EINVAL; |
396 | goto error; | ||
397 | } | ||
398 | 396 | ||
399 | np = oh->od->pdev->dev.of_node; | 397 | np = oh->od->pdev->dev.of_node; |
400 | if (!np) { | 398 | if (!np) { |
@@ -516,8 +514,10 @@ struct platform_device __init *omap_device_build(const char *pdev_name, | |||
516 | goto odbs_exit1; | 514 | goto odbs_exit1; |
517 | 515 | ||
518 | od = omap_device_alloc(pdev, &oh, 1); | 516 | od = omap_device_alloc(pdev, &oh, 1); |
519 | if (IS_ERR(od)) | 517 | if (IS_ERR(od)) { |
518 | ret = PTR_ERR(od); | ||
520 | goto odbs_exit1; | 519 | goto odbs_exit1; |
520 | } | ||
521 | 521 | ||
522 | ret = platform_device_add_data(pdev, pdata, pdata_len); | 522 | ret = platform_device_add_data(pdev, pdata, pdata_len); |
523 | if (ret) | 523 | if (ret) |