Commit 64e57b2
ASoC: Intel: sof_es8336: Drop reference count of ACPI device after use
Theoretically the device might gone if its reference count drops to 0.
This might be the case when we try to find the first physical node of
the ACPI device. We need to keep reference to it until we get a result
of the above mentioned call. Refactor the code to drop the reference
count at the correct place.
While at it, move to acpi_dev_put() as symmetrical call to the
acpi_dev_get_first_match_dev().
Fixes: a164137 ("ASoC: Intel: add machine driver for SOF+ES8336")
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Pierre-Louis Bossart <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>1 parent c8aa49a commit 64e57b2
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
685 | 684 | | |
686 | 685 | | |
687 | 686 | | |
| |||
692 | 691 | | |
693 | 692 | | |
694 | 693 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | 694 | | |
| 695 | + | |
701 | 696 | | |
702 | 697 | | |
703 | 698 | | |
704 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
705 | 707 | | |
706 | 708 | | |
707 | 709 | | |
| |||
0 commit comments