diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-07-12 15:38:07 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-04 13:43:51 +0200 |
commit | 49b368a6b3e803fe4f0a10c14f8fde3f20998f04 (patch) | |
tree | 2e6077341970ccabb6f93222a36b42a30b105a12 /arch/arm/plat-omap/omap_device.c | |
parent | Merge branch 'devel-map-io' into omap-for-linus (diff) | |
download | linux-49b368a6b3e803fe4f0a10c14f8fde3f20998f04.tar.xz linux-49b368a6b3e803fe4f0a10c14f8fde3f20998f04.zip |
omap: device: improve errors handling
Do not forget to check the 'platform_device_add_data()' error code
in 'omap_device_build_ss()'.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Nishanth Menon <nm@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index ea0d659fcb1c..d2b160942ccc 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -407,7 +407,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, od->pdev.num_resources = res_count; od->pdev.resource = res; - platform_device_add_data(&od->pdev, pdata, pdata_len); + ret = platform_device_add_data(&od->pdev, pdata, pdata_len); + if (ret) + goto odbs_exit4; od->pm_lats = pm_lats; od->pm_lats_cnt = pm_lats_cnt; |