diff options
author | 2017-04-25 07:07:18 +0000 | |
---|---|---|
committer | 2017-04-25 11:59:36 -0400 | |
commit | 2f7878c06e2d227aa5c405ddde356403b83e3509 (patch) | |
tree | 9cd17f093e988cb08ddba8208222f4c4ac5b39b6 | |
parent | bpf: map_get_next_key to return first key on NULL (diff) | |
download | wireguard-linux-2f7878c06e2d227aa5c405ddde356403b83e3509.tar.xz wireguard-linux-2f7878c06e2d227aa5c405ddde356403b83e3509.zip |
qed: fix invalid use of sizeof in qed_alloc_qm_data()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: b5a9ee7cf3be ("qed: Revise QM configuration")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c index f168b718594b..ea7931b85879 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -821,7 +821,7 @@ static int qed_alloc_qm_data(struct qed_hwfn *p_hwfn) if (!qm_info->qm_vport_params) goto alloc_err; - qm_info->qm_port_params = kzalloc(sizeof(qm_info->qm_port_params) * + qm_info->qm_port_params = kzalloc(sizeof(*qm_info->qm_port_params) * p_hwfn->cdev->num_ports_in_engines, GFP_KERNEL); if (!qm_info->qm_port_params) |