From: Gustavo Padovan <gustavo@padovan.org>
To: Devendra Naga <devendra.aaru@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Cleanup dtl1_config
Date: Tue, 19 Jun 2012 00:09:35 -0300 [thread overview]
Message-ID: <20120619030935.GC1679@joana> (raw)
In-Reply-To: <1339612935-2851-1-git-send-email-devendra.aaru@gmail.com>
Hi Devendra,
* Devendra Naga <devendra.aaru@gmail.com> [2012-06-14 00:12:15 +0530]:
> the functions always return 0 on sucess and -ve error on failure.
>
> This also removes variable i.
>
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
> ---
> drivers/bluetooth/dtl1_cs.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
> index 6e8d961..f532ce2 100644
> --- a/drivers/bluetooth/dtl1_cs.c
> +++ b/drivers/bluetooth/dtl1_cs.c
> @@ -586,22 +586,19 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data)
> static int dtl1_config(struct pcmcia_device *link)
> {
> dtl1_info_t *info = link->priv;
> - int i;
>
> /* Look for a generic full-sized window */
> link->resource[0]->end = 8;
> if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
> goto failed;
>
> - i = pcmcia_request_irq(link, dtl1_interrupt);
> - if (i != 0)
> + if (pcmcia_request_irq(link, dtl1_interrupt))
> goto failed;
I think this change is wrong, instead you might return i (that should be
renamed to 'err') when the failed label is accessed. This way you improve the
error report of this function.
Gustavo
next prev parent reply other threads:[~2012-06-19 3:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 18:42 [PATCH] Bluetooth: Cleanup dtl1_config Devendra Naga
2012-06-19 3:09 ` Gustavo Padovan [this message]
2012-06-19 4:26 ` devendra.aaru
-- strict thread matches above, loose matches on Subject: below --
2012-06-19 16:21 [PATCH] Bluetooth: cleanup dtl1_config Devendra Naga
2012-06-30 14:45 ` Gustavo Padovan
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=20120619030935.GC1679@joana \
--to=gustavo@padovan.org \
--cc=devendra.aaru@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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).