]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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 0453d1084b2e7be112673607e8df1c72b8fed040..79ca24e6d2c5a931b1ac54b6a117e18780bc942c 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;