All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Franky Lin" <frankyl@broadcom.com>
To: "Il Han" <corone.il.han@gmail.com>
Cc: "Brett Rudley" <brudley@broadcom.com>,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Arend van Spriel" <arend@broadcom.com>,
	"Kan Yan" <kanyan@broadcom.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] brcm80211: Initialize a variable before used.
Date: Mon, 7 May 2012 13:10:59 -0700	[thread overview]
Message-ID: <4FA82C53.5040005@broadcom.com> (raw)
In-Reply-To: <1336418632-16758-1-git-send-email-corone.il.han@gmail.com>

Thanks Il. Removing the declaration and assignment line of val seems to 
be better since it's not used afterward. Do you want to send out a V2? 
Or I can do it.

Thanks,
Franky

On 05/07/2012 12:23 PM, Il Han wrote:
> The variable val is used uninitialized.
> It should be initialized before used.
> Initialize it.
>
> Signed-off-by: Il Han<corone.il.han@gmail.com>
> ---
>   drivers/net/wireless/brcm80211/brcmsmac/aiutils.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
> index c93ea35..d67c5c4 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
> @@ -1141,7 +1141,7 @@ u32 ai_gpiocontrol(struct si_pub *sih, u32 mask, u32 val, u8 priority)
>   void ai_chipcontrl_epa4331(struct si_pub *sih, bool on)
>   {
>   	struct bcma_device *cc;
> -	u32 val;
> +	u32 val = 0;
>
>   	cc = ai_findcore(sih, CC_CORE_ID, 0);
>



      reply	other threads:[~2012-05-07 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 19:23 [PATCH] brcm80211: Initialize a variable before used Il Han
2012-05-07 20:10 ` Franky Lin [this message]

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=4FA82C53.5040005@broadcom.com \
    --to=frankyl@broadcom.com \
    --cc=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=corone.il.han@gmail.com \
    --cc=kanyan@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.