From: Kalle Valo <kvalo@codeaurora.org>
To: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: linux-wireless@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()
Date: Fri, 16 Jun 2017 11:44:22 +0300 [thread overview]
Message-ID: <87shj0z5i1.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1497602195-29895-1-git-send-email-arend.vanspriel@broadcom.com> (Arend van Spriel's message of "Fri, 16 Jun 2017 09:36:35 +0100")
Arend van Spriel <arend.vanspriel@broadcom.com> writes:
> This fixes the following warning:
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c: In function
> 'brcmf_usb_probe_phase2':
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1198:2:
> warning: 'devinfo' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
> mutex_unlock(&devinfo->dev_init_lock);
>
> Fixes: 6d0507a777fb ("brcmfmac: add parameter to pass error code in firmware callback")
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Reported-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
> Hi Kalle,
>
> Here it is. Was indeed a valid warning.
Thanks for the quick fix.
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
> @@ -1164,14 +1164,13 @@ static void brcmf_usb_probe_phase2(struct device *dev, int ret,
> void *nvram, u32 nvlen)
> {
> struct brcmf_bus *bus = dev_get_drvdata(dev);
> - struct brcmf_usbdev_info *devinfo;
> + struct brcmf_usbdev_info *devinfo = bus->bus_priv.usb->devinfo;;
But an extra semicolon :) I'll try to edit it out during commit.
--
Kalle Valo
next prev parent reply other threads:[~2017-06-16 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 8:36 [PATCH] brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2() Arend van Spriel
2017-06-16 8:44 ` Kalle Valo [this message]
2017-06-16 10:12 ` Arend van Spriel
2017-06-16 8:53 ` Kalle Valo
2017-06-18 4:26 ` [PATCH] " Julian Calaby
2017-06-18 13:01 ` Arend van Spriel
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=87shj0z5i1.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=arend.vanspriel@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).