omap: device: improve errors handling
Subsystems (2)
PATCH 1/1 omap: device: improve errors handling
From: Artem Bityutskiy <[email protected]>
Do not forget to check the 'platform_device_add_data()' error code in 'omap_device_build_ss()'.
--- arch/arm/plat-omap/omap_device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-omap/omap_device.c +3 -1
@@ -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;
Signature · 1 line
1.7.1.1
Quoted 4 lines · Artem Bityutskiy
From: Artem Bityutskiy <[email protected]>
Do not forget to check the '
platform_device_add_data()' error code in 'omap_device_build_ss()'.
Looks fine to me, platform_device_add_data() can return -ENOMEM in the unlikely event that its kmemdup() fails.
Quoted 33 lines
Signed-off-by Artem Bityutskiy <[email protected]>Acked-by Nishanth Menon <[email protected]>--- arch/arm/plat-omap/omap_device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)arch/arm/plat-omap/omap_device.c +3
-1@@ -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;Signature · 9 lines
1.7.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
- Paul
Tony,
by the way,
Quoted 11 lines · Paul Walmsley
Quoted 4 lines · Artem Bityutskiy
From: Artem Bityutskiy <[email protected]>
Do not forget to check the '
platform_device_add_data()' error code in 'omap_device_build_ss()'.Looks fine to me,
platform_device_add_data()can return-ENOMEMin the unlikely event that itskmemdup()fails.Acked-by Paul Walmsley <[email protected]>
you want to take this one, or want me to queue it up for .37?
- Paul
Quoted 13 lines · Paul Walmsley
Tony,
by the way,
Quoted 7 lines · Paul Walmsley
Quoted 4 lines · Artem Bityutskiy
From: Artem Bityutskiy <[email protected]>
Do not forget to check the '
platform_device_add_data()' error code in 'omap_device_build_ss()'.
Quoted 6 lines
Quoted 4 lines
Looks fine to me,
platform_device_add_data()can return-ENOMEMin the unlikely event that itskmemdup()fails.Acked-by Paul Walmsley <[email protected]>you want to take this one, or want me to queue it up for .37?
Thanks, I'll add it to omap-for-linus for 2.6.36.
Regards,
Tony