From: Dan Carpenter <error27@gmail.com>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: "Kernel Janitors" <kernel-janitors@vger.kernel.org>,
"Marcel Holtmann" <marcel@holtmann.org>,
"Bing Zhao" <bzhao@marvell.com>,
"Ben Hutchings" <ben@decadent.org.uk>,
"André Goddard Rosa" <andre.goddard@gmail.com>,
"Julia Lawall" <julia@diku.dk>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bluetooth: btmrvl_sdio: silence warning
Date: Mon, 5 Jul 2010 11:24:15 +0200 [thread overview]
Message-ID: <20100705092414.GY19184@bicker> (raw)
In-Reply-To: <1278316883-29784-1-git-send-email-segooon@gmail.com>
On Mon, Jul 05, 2010 at 12:01:22PM +0400, Kulikov Vasiliy wrote:
> Clone checking of ret to simplify the code.
>
> This patch silences a compiler warning:
> drivers/bluetooth/btmrvl_sdio.c: In function ‘btmrvl_sdio_verify_fw_download’:
> drivers/bluetooth/btmrvl_sdio.c:80: warning: ‘fws1’ may be used uninitialized in this function
> drivers/bluetooth/btmrvl_sdio.c:80: note: ‘fws1’ was declared here
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
> drivers/bluetooth/btmrvl_sdio.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
> index df0773e..47f0f91 100644
> --- a/drivers/bluetooth/btmrvl_sdio.c
> +++ b/drivers/bluetooth/btmrvl_sdio.c
> @@ -83,10 +83,10 @@ static int btmrvl_sdio_read_fw_status(struct btmrvl_sdio_card *card, u16 *dat)
> *dat = 0;
>
> fws0 = sdio_readb(card->func, CARD_FW_STATUS0_REG, &ret);
> + if (ret)
> + return -EIO;
Normally it would be better to just "return ret;" here. But the caller
doesn't use the return code so it doesn't really matter...
Reviewed-by: Dan Carpenter <error27@gmail.com>
regards,
dan carpenter
>
> - if (!ret)
> - fws1 = sdio_readb(card->func, CARD_FW_STATUS1_REG, &ret);
> -
> + fws1 = sdio_readb(card->func, CARD_FW_STATUS1_REG, &ret);
> if (ret)
> return -EIO;
>
next prev parent reply other threads:[~2010-07-05 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 8:01 [PATCH] bluetooth: btmrvl_sdio: silence warning Kulikov Vasiliy
2010-07-05 9:24 ` Dan Carpenter [this message]
2010-07-08 21:02 ` Marcel Holtmann
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=20100705092414.GY19184@bicker \
--to=error27@gmail.com \
--cc=andre.goddard@gmail.com \
--cc=ben@decadent.org.uk \
--cc=bzhao@marvell.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=segooon@gmail.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).