From: Dmitry Artamonow <mad_soft@inbox.ru>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: netdev@vger.kernel.org, Samuel Ortiz <samuel@sortiz.org>,
Russell King <linux@arm.linux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] irda/sa1100_ir: check return value of startup hook
Date: Sat, 10 Oct 2009 00:12:24 +0400 [thread overview]
Message-ID: <20091009201224.GA6208@rainbow> (raw)
In-Reply-To: <4ACF293C.7070803@ru.mvista.com>
[-- 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
next prev parent reply other threads:[~2009-10-09 20:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-10-13 10:17 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091009201224.GA6208@rainbow \
--to=mad_soft@inbox.ru \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.org \
--cc=sshtylyov@ru.mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).