From: Artem Bityutskiy Date: Mon, 12 Jul 2010 13:38:07 +0000 (+0000) Subject: omap: device: improve errors handling X-Git-Tag: upstream/snapshot3+hdmi~13704^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49b368a6b3e803fe4f0a10c14f8fde3f20998f04;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Nishanth Menon Acked-by: Paul Walmsley Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index ea0d659..d2b1609 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;