ASoC: wcd9335: Fix null pointer dereference
If sound card registration fails at bootup and if
headset is connected, mbhc interrupt handler tries
to access the codec pointer for read/write registers.
However as part of the sound card component cleanup,
the codec memory will be freed. It will result into
panic when mbhc access the codec registers. Prevent
panic by freeing the wcd9335 private structure in
device remove instead of when ASoC removes the codec
component.
Change-Id: I11e5cfe7cdca21b7b925a7cdd877811c696d8737
Signed-off-by:
Phani Kumar Uppalapati <phaniu@codeaurora.org>
Loading
Please register or sign in to comment