]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
octeontx2-pf: Fix devm_kcalloc() error checking
authorDan Carpenter <dan.carpenter@linaro.org>
Sat, 1 Nov 2025 13:26:42 +0000 (16:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:43 +0000 (15:37 -0500)
commit3af1510a33ff2e2c023fdfe702e36ec408a0820d
treec6ddb82a2b582bec6a1fad5a9b9b4f5e4326bacb
parentaf048f7bd8e878682131dc524a7f68ee1eaa3311
octeontx2-pf: Fix devm_kcalloc() error checking

[ Upstream commit 2e25935ed24daee37c4c2e8e29e478ce6e1f72c7 ]

The devm_kcalloc() function never return error pointers, it returns NULL
on failure.  Also delete the netdev_err() printk.  These allocation
functions already have debug output built-in some the extra error message
is not required.

Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aQYKkrGA12REb2sj@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c