linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] omap: device: improve errors handling
@ 2010-07-12 13:38 Artem Bityutskiy
  2010-07-12 16:30 ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2010-07-12 13:38 UTC (permalink / raw)
  To: Tony Lindgen; +Cc: linux-omap, ext Menon, Nishanth, Thara Gopinath

From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

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>
---
 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 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;
-- 
1.7.1.1





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] omap: device: improve errors handling
  2010-07-12 13:38 [PATCH] omap: device: improve errors handling Artem Bityutskiy
@ 2010-07-12 16:30 ` Paul Walmsley
  2010-07-12 16:31   ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2010-07-12 16:30 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: Tony Lindgen, linux-omap, ext Menon, Nishanth, Thara Gopinath

On Mon, 12 Jul 2010, Artem Bityutskiy wrote:

> From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> 
> 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.

Acked-by: Paul Walmsley <paul@pwsan.com>

> 
> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> Acked-by: Nishanth Menon <nm@ti.com>
> ---
>  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 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;
> -- 
> 1.7.1.1
> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


- Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] omap: device: improve errors handling
  2010-07-12 16:30 ` Paul Walmsley
@ 2010-07-12 16:31   ` Paul Walmsley
  2010-08-04  9:46     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2010-07-12 16:31 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Artem Bityutskiy, linux-omap, ext Menon, Nishanth, Thara Gopinath

Tony,

by the way,

On Mon, 12 Jul 2010, Paul Walmsley wrote:

> On Mon, 12 Jul 2010, Artem Bityutskiy wrote:
> 
> > From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > 
> > 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.
> 
> Acked-by: Paul Walmsley <paul@pwsan.com>

you want to take this one, or want me to queue it up for .37?


- Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] omap: device: improve errors handling
  2010-07-12 16:31   ` Paul Walmsley
@ 2010-08-04  9:46     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2010-08-04  9:46 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: Artem Bityutskiy, linux-omap, ext Menon, Nishanth, Thara Gopinath

* Paul Walmsley <paul@pwsan.com> [100712 19:24]:
> Tony,
> 
> by the way,
> 
> On Mon, 12 Jul 2010, Paul Walmsley wrote:
> 
> > On Mon, 12 Jul 2010, Artem Bityutskiy wrote:
> > 
> > > From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
> > > 
> > > 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.
> > 
> > Acked-by: Paul Walmsley <paul@pwsan.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-04  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-12 13:38 [PATCH] omap: device: improve errors handling Artem Bityutskiy
2010-07-12 16:30 ` Paul Walmsley
2010-07-12 16:31   ` Paul Walmsley
2010-08-04  9:46     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).