diff options
| author | Richard Fitzgerald <[email protected]> | 2024-08-26 09:49:40 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2024-08-26 10:03:57 +0000 |
| commit | 28b329f431cef840fddd9a9b493bc3eff1aa06c0 (patch) | |
| tree | 345482ffdc6f76579e86ff4681a6a523da239e45 /drivers/platform/surface/aggregator/ssh_parser.c | |
| parent | ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED (diff) | |
| download | kernel-28b329f431cef840fddd9a9b493bc3eff1aa06c0.tar.gz kernel-28b329f431cef840fddd9a9b493bc3eff1aa06c0.zip | |
ALSA: hda: hda_component: Fix mutex crash if nothing ever binds
Move the initialization of parent->mutex into
hda_component_manager_init() so that it is always valid.
In hda_component_manager_bind() do not clear the parent information.
Only zero-fill the per-component data ready for it to be filled in
by the components as they bind.
Previously parent->mutex was being initialized only in
hda_component_manager_bind(). This meant that it was only
initialized if all components appeared and there was a bind callback.
If there wasn't a bind the mutex object was not valid when the
Realtek driver called any of the other functions.
Signed-off-by: Richard Fitzgerald <[email protected]>
Fixes: 047b9cbbaa8e ("ALSA: hda: hda_component: Protect shared data with a mutex")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions
