MLK-20190-02 brcmfmac: init the wlfc_mode variable before it is used
authorAndy Duan <fugang.duan@nxp.com>
Wed, 7 Nov 2018 06:51:52 +0000 (14:51 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Init the wlfc_mode variable before it is used to fix
coverity issue of "Uninitialized variable".

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c

index c35b1e9..f8079ca 100644 (file)
@@ -2345,7 +2345,7 @@ struct brcmf_fws_info *brcmf_fws_attach(struct brcmf_pub *drvr)
        struct brcmf_if *ifp;
        u32 tlv = BRCMF_FWS_FLAGS_RSSI_SIGNALS;
        int rc;
-       u32 mode;
+       u32 mode = 0;
 
        fws = kzalloc(sizeof(*fws), GFP_KERNEL);
        if (!fws) {