Re: [PATCH v2] ALSA: usb-audio: qcom: fix NULL pointer dereference in qmi_stop_session
From: Takashi Iwai
Date: Wed Jun 25 2025 - 02:29:14 EST
On Tue, 24 Jun 2025 11:00:47 +0200,
Pei Xiao wrote:
>
> The find_substream() call may return NULL, but the error path
> dereferenced 'subs' unconditionally via dev_err(&subs->dev->dev, ...),
> causing a NULL pointer dereference when subs is NULL.
>
> Fix by switching to &uadev[idx].udev->dev which is always valid
> in this context.
>
> Signed-off-by: Pei Xiao <xiaopei01@xxxxxxxxxx>
Applied now. Thanks.
Takashi