Commit 9d51299
committed
net: macb: free resources in case of failure
In case macb_open() fails and user space tries to "ifup" the again
the interface after this failure, the napi_enable() will reach a
BUG_ON() instruction because the napi wasn't disabled the the
previous macb_open() failure. So, add failure path in macb_open()
that reverts the previously done operations.
Fixes: b2b0414 ("net: macb: convert to phylink")
Tested-by: Cristian Birsan <cristian.birsan@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>1 parent f9ff2b7 commit 9d51299
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2500 | 2500 | | |
2501 | 2501 | | |
2502 | 2502 | | |
2503 | | - | |
| 2503 | + | |
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
| |||
2509 | 2509 | | |
2510 | 2510 | | |
2511 | 2511 | | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
2512 | 2518 | | |
2513 | 2519 | | |
2514 | 2520 | | |
| |||
0 commit comments