Skip to content

Commit

Permalink
brcmfmac: fix uninitialized warning in brcmf_usb_probe_phase2()
Browse files Browse the repository at this point in the history
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: 6d0507a ("brcmfmac: add parameter to pass error code in firmware callback")
Cc: Stephen Rothwell <[email protected]>
Reported-by: Kalle Valo <[email protected]>
Signed-off-by: Arend van Spriel <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
Arend Van Spriel authored and Kalle Valo committed Jun 16, 2017
1 parent a2b7a62 commit 35abcd4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

if (ret)
goto error;

brcmf_dbg(USB, "Start fw downloading\n");

devinfo = bus->bus_priv.usb->devinfo;
ret = check_file(fw->data);
if (ret < 0) {
brcmf_err("invalid firmware\n");
Expand Down

0 comments on commit 35abcd4

Please sign in to comment.