Commit b032ae5
marvell: pxa168_eth: fix call balance of pep->clk handling routines
If the clock pep->clk was not enabled in pxa168_eth_probe,
it should not be disabled in any path.
Conversely, if it was enabled in pxa168_eth_probe, it must be disabled
in all error paths to ensure proper cleanup.
Use the devm_clk_get_enabled helper function to ensure proper call balance
for pep->clk.
Found by Linux Verification Center (linuxtesting.org) with Klever.
Fixes: a49f37e ("net: add Fast Ethernet driver for PXA168.")
Signed-off-by: Vitalii Mordan <mordan@ispras.ru>
Link: https://patch.msgid.link/20241121200658.2203871-1-mordan@ispras.ru
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 9cc8d0e commit b032ae5
1 file changed
+4
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | | - | |
| 1397 | + | |
1398 | 1398 | | |
1399 | | - | |
| 1399 | + | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | | - | |
1403 | 1402 | | |
1404 | 1403 | | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
| 1404 | + | |
| 1405 | + | |
1409 | 1406 | | |
1410 | 1407 | | |
1411 | 1408 | | |
| |||
1523 | 1520 | | |
1524 | 1521 | | |
1525 | 1522 | | |
1526 | | - | |
1527 | | - | |
1528 | 1523 | | |
1529 | 1524 | | |
1530 | 1525 | | |
| |||
1542 | 1537 | | |
1543 | 1538 | | |
1544 | 1539 | | |
1545 | | - | |
1546 | 1540 | | |
1547 | 1541 | | |
1548 | 1542 | | |
| |||
0 commit comments