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>
This commit is contained in:
Artem Bityutskiy 2010-07-12 13:38:07 +00:00 committed by Tony Lindgren
parent 7590d1defd
commit 49b368a6b3
1 changed files with 3 additions and 1 deletions

View File

@ -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.num_resources = res_count;
od->pdev.resource = res; 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 = pm_lats;
od->pm_lats_cnt = pm_lats_cnt; od->pm_lats_cnt = pm_lats_cnt;