brcmfmac: uninitialized "ret" variable
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Mar 2016 07:06:10 +0000 (10:06 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 6 Apr 2016 18:27:16 +0000 (21:27 +0300)
There is an error path where "ret" isn't initialized.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

index da0cdd3138802d6bf1925c5249cbb8e08e083cba..2fc0597f2cd07b378fb3ea44b1ea24250b0d28fa 100644 (file)
@@ -250,7 +250,7 @@ static int brcmf_sdiod_request_data(struct brcmf_sdio_dev *sdiodev, u8 fn,
                                    u32 addr, u8 regsz, void *data, bool write)
 {
        struct sdio_func *func;
-       int ret;
+       int ret = -EINVAL;
 
        brcmf_dbg(SDIO, "rw=%d, func=%d, addr=0x%05x, nbytes=%d\n",
                  write, fn, addr, regsz);