netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irda/sa1100_ir: check return value of startup hook
@ 2009-10-09  7:25 Dmitry Artamonow
  2009-10-09 12:14 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Artamonow @ 2009-10-09  7:25 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: netdev, Russell King, David S. Miller, linux-arm-kernel

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 drivers/net/irda/sa1100_ir.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 38bf7cf..df5db2d 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -232,8 +232,11 @@ static int sa1100_irda_startup(struct sa1100_irda *si)
 	/*
 	 * Ensure that the ports for this device are setup correctly.
 	 */
-	if (si->pdata->startup)
-		si->pdata->startup(si->dev);
+	if (si->pdata->startup)	{
+		ret = si->pdata->startup(si->dev);
+		if (ret)
+			return ret;
+		}
 
 	/*
 	 * Configure PPC for IRDA - we want to drive TXD2 low.
-- 
1.6.3.4

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

* Re: [PATCH] irda/sa1100_ir: check return value of startup hook
  2009-10-09  7:25 [PATCH] irda/sa1100_ir: check return value of startup hook Dmitry Artamonow
@ 2009-10-09 12:14 ` Sergei Shtylyov
  2009-10-09 20:12   ` Dmitry Artamonow
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2009-10-09 12:14 UTC (permalink / raw)
  To: Dmitry Artamonow
  Cc: netdev, Samuel Ortiz, Russell King, David S. Miller,
	linux-arm-kernel

Hello.

Dmitry Artamonow wrote:

> Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
[...]
> diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
> index 38bf7cf..df5db2d 100644
> --- a/drivers/net/irda/sa1100_ir.c
> +++ b/drivers/net/irda/sa1100_ir.c
> @@ -232,8 +232,11 @@ static int sa1100_irda_startup(struct sa1100_irda *si)
>  	/*
>  	 * Ensure that the ports for this device are setup correctly.
>  	 */
> -	if (si->pdata->startup)
> -		si->pdata->startup(si->dev);
> +	if (si->pdata->startup)	{
> +		ret = si->pdata->startup(si->dev);
> +		if (ret)
> +			return ret;
> +		}

    Overindented brace.

>  
>  	/*
>  	 * Configure PPC for IRDA - we want to drive TXD2 low.

WBR, Sergei

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

* Re: [PATCH] irda/sa1100_ir: check return value of startup hook
  2009-10-09 12:14 ` Sergei Shtylyov
@ 2009-10-09 20:12   ` Dmitry Artamonow
  2009-10-13 10:17     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Artamonow @ 2009-10-09 20:12 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: netdev, Samuel Ortiz, Russell King, David S. Miller,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

On 16:14 Fri 09 Oct     , Sergei Shtylyov wrote:

[...]
> > -	if (si->pdata->startup)
> > -		si->pdata->startup(si->dev);
> > +	if (si->pdata->startup)	{
> > +		ret = si->pdata->startup(si->dev);
> > +		if (ret)
> > +			return ret;
> > +		}
> 
>     Overindented brace.
> 

Nice catch, thanks!

Updated patch in attachment.

-- 
Best regards,
Dmitry "MAD" Artamonow


[-- Attachment #2: 0001-irda-sa1100_ir-check-return-value-of-startup-hook.patch --]
[-- Type: text/plain, Size: 933 bytes --]

>From ba1fe701950634aae46aa59431633e99f8bd18cc Mon Sep 17 00:00:00 2001
From: Dmitry Artamonow <mad_soft@inbox.ru>
Date: Fri, 9 Oct 2009 21:56:21 +0400
Subject: [PATCH v2] irda/sa1100_ir: check return value of startup hook

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 drivers/net/irda/sa1100_ir.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 38bf7cf..c412e80 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -232,8 +232,11 @@ static int sa1100_irda_startup(struct sa1100_irda *si)
 	/*
 	 * Ensure that the ports for this device are setup correctly.
 	 */
-	if (si->pdata->startup)
-		si->pdata->startup(si->dev);
+	if (si->pdata->startup)	{
+		ret = si->pdata->startup(si->dev);
+		if (ret)
+			return ret;
+	}
 
 	/*
 	 * Configure PPC for IRDA - we want to drive TXD2 low.
-- 
1.6.3.4


[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] irda/sa1100_ir: check return value of startup hook
  2009-10-09 20:12   ` Dmitry Artamonow
@ 2009-10-13 10:17     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-10-13 10:17 UTC (permalink / raw)
  To: mad_soft; +Cc: sshtylyov, samuel, netdev, linux, linux-arm-kernel

From: Dmitry Artamonow <mad_soft@inbox.ru>
Date: Sat, 10 Oct 2009 00:12:24 +0400

>>From ba1fe701950634aae46aa59431633e99f8bd18cc Mon Sep 17 00:00:00 2001
> From: Dmitry Artamonow <mad_soft@inbox.ru>
> Date: Fri, 9 Oct 2009 21:56:21 +0400
> Subject: [PATCH v2] irda/sa1100_ir: check return value of startup hook
> 
> Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>

Applied, thanks.

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

end of thread, other threads:[~2009-10-13 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09  7:25 [PATCH] irda/sa1100_ir: check return value of startup hook Dmitry Artamonow
2009-10-09 12:14 ` Sergei Shtylyov
2009-10-09 20:12   ` Dmitry Artamonow
2009-10-13 10:17     ` David Miller

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).