Commit 81eb5c6
committed
ASoC: SOF: topology: add state variable to check topology load state
With the complicated error flow, we don't have a record of whether the
topology was loaded or not. Having a dmesg trace would help indicate
an unintended path in error handling.
Add a boolean to only load the topology if it's not already loaded,
and free the topology if it's loaded, and log errors as needed.
Note that the topology_free should itself never result in any
crashes. If it does it's a separate issue from identifying bad error
handling.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>1 parent 1ba6eed commit 81eb5c6
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2620 | 2620 | | |
2621 | 2621 | | |
2622 | 2622 | | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
2623 | 2628 | | |
2624 | 2629 | | |
2625 | 2630 | | |
| |||
2639 | 2644 | | |
2640 | 2645 | | |
2641 | 2646 | | |
| 2647 | + | |
| 2648 | + | |
2642 | 2649 | | |
2643 | 2650 | | |
2644 | 2651 | | |
| |||
2650 | 2657 | | |
2651 | 2658 | | |
2652 | 2659 | | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
2653 | 2664 | | |
2654 | 2665 | | |
2655 | 2666 | | |
| |||
2665 | 2676 | | |
2666 | 2677 | | |
2667 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
2668 | 2681 | | |
2669 | 2682 | | |
0 commit comments