* [PATCH] brcm80211: Initialize a variable before used.
@ 2012-05-07 19:23 Il Han
2012-05-07 20:10 ` Franky Lin
0 siblings, 1 reply; 2+ messages in thread
From: Il Han @ 2012-05-07 19:23 UTC (permalink / raw)
To: Brett Rudley, Roland Vossen, Arend van Spriel,
Franky (Zhenhui) Lin, Kan Yan
Cc: linux-wireless, Il Han
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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] brcm80211: Initialize a variable before used.
2012-05-07 19:23 [PATCH] brcm80211: Initialize a variable before used Il Han
@ 2012-05-07 20:10 ` Franky Lin
0 siblings, 0 replies; 2+ messages in thread
From: Franky Lin @ 2012-05-07 20:10 UTC (permalink / raw)
To: Il Han
Cc: Brett Rudley, Roland Vossen, Arend van Spriel, Kan Yan,
linux-wireless
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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-07 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 19:23 [PATCH] brcm80211: Initialize a variable before used Il Han
2012-05-07 20:10 ` Franky Lin
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).