Search Linux Wireless

Re: [PATCH] brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
> Reported-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
> Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
> ---
> 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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux