]> git.baikalelectronics.ru Git - kernel.git/commit
qed: fix invalid use of sizeof in qed_alloc_qm_data()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 25 Apr 2017 07:07:18 +0000 (07:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 15:59:36 +0000 (11:59 -0400)
commit0fe189b67f2748860e1239006a556df0f96614e7
tree9cd17f093e988cb08ddba8208222f4c4ac5b39b6
parent354e962d642e2571588dd27c314ebb929207d4d4
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: 780fd91fcfb6 ("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>
drivers/net/ethernet/qlogic/qed/qed_dev.c