Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8beb58f7 authored by Mayank Rana's avatar Mayank Rana
Browse files

sound: usb: Add NULL check against udev with uaudio_dev_cleanup() API



uaudio_dev_cleanup() API can be called from ADSP SSR context (from work
context) and USB headset disconnect context. When USB headset is being
removed, driver sends disconnect notification to ADSP firmware and it can
be blocked for 10 seconds (timeout) before calling uaudio_dev_cleanup().
If this thread is block (possibly due to ADSP SSR), and in parallel driver
is handling ADSP SSR notification, driver is releasing all resource
including secondary event ring. Once above thread unblocks or timeout, it
goes try to release secondary USB event ring. As uaudio_dev_cleanup() is
already being called, and release secondary USB event ring, it shall see
udev->dev as NULL. Fix this issue by adding explicit check against udev
with uaudio_dev_cleanup() API.

Change-Id: I1e2e4a61dcbea4c0570ac97677bf74b453fac82c
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent b490abfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment