]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mana: Return error code from mana_create_rxq()
authorAditya Garg <gargaditya@linux.microsoft.com>
Mon, 27 Jul 2026 11:37:59 +0000 (04:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jul 2026 00:46:35 +0000 (17:46 -0700)
commite67cc80b50f587cd1d8ffc8989dcec3291720bc3
treebd42bbac3ff7d5d57678b5787f21f314dfff95da
parent4107af9967e9ec049091b8f009374c4981d458cf
net: mana: Return error code from mana_create_rxq()

mana_create_rxq() returns a struct mana_rxq pointer and returns NULL on
any failure. The caller, mana_add_rx_queues(), cannot tell what went
wrong and hardcodes the error as -ENOMEM. As a result the actual failure
reported by the lower layers (for example -EPROTO from a failed HW
request) is masked and every RX queue creation failure looks like an
out-of-memory error.

Return an ERR_PTR() encoded error code from mana_create_rxq() on failure
instead of NULL. The caller now propagates the returned error code
directly instead of substituting -ENOMEM.

Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260727113759.2881500-1-gargaditya@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/microsoft/mana/mana_en.c