diff options
| author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2026-10-27 10:38:38 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-27 11:53:12 +0000 |
| commit | 7d357eae973a1e1933f81f55aa1b3b4e3064570f (patch) | |
| tree | 18ae828826a6599f748dc0a2e3864944522fcafc /scripts/basic/split-include.c | |
| parent | d34a818a331f7e270fa9dc3db3d96f6a0d4fa7ab (diff) | |
| download | linux-7d357eae973a1e1933f81f55aa1b3b4e3064570f.tar.gz linux-7d357eae973a1e1933f81f55aa1b3b4e3064570f.zip | |
ASoC: hdac_hda: Allocate the private data at codec driver bind
The SOF HDA code allocates struct hdac_hda_priv and stores it as drvdata
of the codec device before the codec driver is bound. The driver core
clears drvdata on unbind, so after unbinding the codec driver via sysfs
a subsequent bind dereferences a NULL pointer in hdac_hda_dev_probe().
All information in the private data can be derived from the codec
device itself, so allocate and set it up in hdac_hda_dev_probe() as a
device managed resource, which is released on unbind.
Remove the allocation from SOF, keeping the check for iDisp codecs
without display audio component.
Fixes: 3fd63658caed ("ASoC: Intel: Drop hdac_ext usage for codec device creation")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20261027083840.28813-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
