diff mbox

omap: device: improve errors handling

Message ID 1278941887.16634.85.camel@localhost (mailing list archive)
State Accepted
Commit 5edbb5de3a6616ffd685e6d63628d7a1968684a6
Headers show

Commit Message

Artem Bityutskiy July 12, 2010, 1:38 p.m. UTC
None
diff mbox

Patch

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;