Commit 9ad3072
driver core: Refactor multiple copies of device cleanup
There are 3 copies of the same device cleanup code used for probe failure,
testing re-probing, and device unbinding. Changes to this code often miss
at least one of the copies of the code. See commits d0243bb ("drivers
core: Free dma_range_map when driver probe failed") and d8f7a54
("driver core: Free DMA range map when device is released") for example.
Let's refactor the code to its own function.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220223225257.1681968-2-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 5bff963 commit 9ad3072
1 file changed
Lines changed: 16 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
509 | 522 | | |
510 | 523 | | |
511 | 524 | | |
| |||
628 | 641 | | |
629 | 642 | | |
630 | 643 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | 644 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
| 645 | + | |
641 | 646 | | |
642 | 647 | | |
643 | 648 | | |
| |||
667 | 672 | | |
668 | 673 | | |
669 | 674 | | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 675 | + | |
680 | 676 | | |
681 | 677 | | |
682 | 678 | | |
| |||
1209 | 1205 | | |
1210 | 1206 | | |
1211 | 1207 | | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
| 1208 | + | |
1223 | 1209 | | |
1224 | 1210 | | |
1225 | 1211 | | |
| |||
0 commit comments