commit | 77296bf6a7b806b00a62b53436b1e8429becd244 | [log] [tgz] |
---|---|---|
author | Yunsheng Lin <linyunsheng@huawei.com> | Mon May 06 10:48:52 2019 +0800 |
committer | David S. Miller <davem@davemloft.net> | Tue May 07 10:37:14 2019 -0700 |
tree | b868061e4bce3d7be87ab96209ae1a9087b55be2 | |
parent | 845e0d1d5290c3b242aa76f37b4a5cae287b6f75 [diff] |
net: hns3: use devm_kcalloc when allocating desc_cb This patch uses devm_kcalloc instead of kcalloc when allocating ring->desc_cb, because devm_kcalloc not only ensure to free the memory when the dev is deallocted, but also allocate the memory from it's device memory node. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>