Commit 89886ab
net: stmmac: dwc-qos: fix clk prepare/enable leak on probe failure
dwc_eth_dwmac_probe() gets bulk clocks, and then prepares and enables
them. Unfortunately, if dwc_eth_dwmac_config_dt() or stmmac_dvr_probe()
fail, we leave the clocks prepared and enabled. Fix this by using
devm_clk_bulk_get_all_enabled() to combine the steps and provide devm
based release of the prepare and enable state.
This also fixes a similar leakin dwc_eth_dwmac_remove() which wasn't
correctly retrieving the struct plat_stmmacenet_data. This becomes
unnecessary.
Signed-off-by: Russell King (Oracle) <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Fixes: a045e40 ("net: stmmac: refactor clock management in EQoS driver")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent de1e963 commit 89886ab
1 file changed
+2
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 338 | | |
343 | 339 | | |
344 | 340 | | |
345 | 341 | | |
346 | 342 | | |
347 | 343 | | |
348 | 344 | | |
349 | | - | |
350 | 345 | | |
351 | 346 | | |
352 | 347 | | |
| |||
370 | 365 | | |
371 | 366 | | |
372 | 367 | | |
373 | | - | |
374 | 368 | | |
375 | 369 | | |
376 | 370 | | |
377 | 371 | | |
378 | 372 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | 373 | | |
383 | 374 | | |
384 | 375 | | |
| |||
0 commit comments