Skip to content

Commit

Permalink
brcmfmac: cleanup a sizeof()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Kalle Valo committed May 9, 2015
1 parent 6f157ed commit d5c5181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5c5181

Please sign in to comment.