IB/hifi1: add a null check of kzalloc_node in hfi1_ipoib_txreq_init
authorKang Chen <void0red@gmail.com>
Mon, 27 Feb 2023 10:02:12 +0000 (18:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:32 +0000 (23:03 +0900)
commitd7c8d32e5d3a496e9537054e28880fff5bdf9ce5
treeee8d83e87c2aa5c706fa4bad7ce61dd683fbbab8
parenta2290ed2afa714c7d0557b820d73deaec6b487a1
IB/hifi1: add a null check of kzalloc_node in hfi1_ipoib_txreq_init

[ Upstream commit c874ad879c2f29ebe040a34b974389875c0d81eb ]

kzalloc_node may fails, check it and do the cleanup.

Fixes: b1151b74ff68 ("IB/hfi1: Fix alloc failure with larger txqueuelen")
Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227100212.910820-1-void0red@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hfi1/ipoib_tx.c