]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 11:57:06 +0000 (12:57 +0100)
commit9ace998abd043e097384843e0e52f3bfb6b62c25
treecfc844da4e2c5f04ae30779d31210ebdd5c52627
parentaf48f51cb5934738a3ee97e951d7dededf029488
net: qlogic: check the return value of dma_alloc_coherent() in qed_vf_hw_prepare()

[ Upstream commit e0058f0fa80f6e09c4d363779c241c45a3c56b94 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_vf.c