net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Sat, 5 Mar 2022 09:14:11 +0000 (01:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Mar 2022 11:28:38 +0000 (11:28 +0000)
commite0058f0fa80f6e09c4d363779c241c45a3c56b94
tree7f2d8a9ef75a5d2279c949bc17f86cac7c93176d
parentd0aeb0d4a3f7d2a0df7e9545892bbeede8f2ac7e
net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare()

The function dma_alloc_coherent() in qed_vf_hw_prepare() can fail, so
its return value should be checked.

Fixes: 1408cc1fa48c ("qed: Introduce VFs")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_vf.c