Thread (3 messages) read the whole thread 3 messages, 3 authors, 3d ago

Re: [PATCH net v2] net: mana: Return error code from mana_create_rxq()

From: Joe Damato <hidden>
Date: 2026-07-27 17:36:42
Also in: linux-hyperv, lkml

On Mon, Jul 27, 2026 at 04:37:59AM -0700, Aditya Garg wrote:
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 <redacted>
---
Changes in v2:
 - Use ERR_PTR() to return the error from mana_create_rxq() instead of
   adding an output parameter, keeping the pointer return type.

v1: https://lore.kernel.org/all/20260718024818.560552-1-gargaditya@linux.microsoft.com/ (local)

 drivers/net/ethernet/microsoft/mana/mana_en.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Joe Damato <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help