brcmfmac: cleanup a sizeof()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 May 2015 09:59:19 +0000 (12:59 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 9 May 2015 13:51:01 +0000 (16:51 +0300)
"flowrings" and "*flowrings" are both pointers so this always returns
sizeof(void *) and the current code works fine.  But "*flowrings" is
intended here and static checkers complain, so lets change it.

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

index 0453d10..79ca24e 100644 (file)
@@ -1617,7 +1617,7 @@ static void brcmf_pcie_setup(struct device *dev, const struct firmware *fw,
                bus->msgbuf->commonrings[i] =
                                &devinfo->shared.commonrings[i]->commonring;
 
-       flowrings = kcalloc(devinfo->shared.nrof_flowrings, sizeof(flowrings),
+       flowrings = kcalloc(devinfo->shared.nrof_flowrings, sizeof(*flowrings),
                            GFP_KERNEL);
        if (!flowrings)
                goto fail;