Skip to contentSkip to conversation

net: macb: propagate macb_open() failure in macb_set_ringparam()

PATCH In review Nicolai Buchwitz 3 participants 3 messages Mar 17 – Mar 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: macb: propagate macb_open() failure in macb_set_ringparam()

macb_set_ringparam() silently ignores macb_open() failure after closing and reopening the interface, always returning 0. Propagate the error so callers know the interface failed to come back up.

---
 drivers/net/ethernet/cadence/macb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/cadence/macb_main.c +1 -1
index 83390dcc89e9..9957f5ae1752 100644
@@ -3754,7 +3754,7 @@ static int macb_set_ringparam(struct net_device *netdev,
 	bp->tx_ring_size = new_tx_size;
 
 	if (reset)
-		macb_open(bp->dev);
+		return macb_open(bp->dev);
 
 	return 0;
 }
Signature · 1 line
2.51.0
maintainer
#2 lore raw
In reply to Nicolai Buchwitz
Quoted 3 lines · On Tue, 17 Mar 2026 21:22:29 +0100 Nicolai Buchwitz wrote:

macb_set_ringparam() silently ignores macb_open() failure after closing and reopening the interface, always returning 0. Propagate the error so callers know the interface failed to come back up.

Not sure it's worth it on its own, the driver will implode if the user tries to change the config again or bring the device up or down. The fact that error is nor propagated is the least of our worries.

Signature · 1 line
pw-bot: cr