]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: usb: qcom: fix NULL pointer dereference in qmi_stop_session
authorPei Xiao <xiaopei01@kylinos.cn>
Tue, 24 Jun 2025 09:00:47 +0000 (17:00 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 Jun 2025 06:28:16 +0000 (08:28 +0200)
commit5e9571750c4e53d16727a04159455c693d7b31cb
treef2e7626864b08ee8901091125941da6eb7f83767
parentb272f42547d85356b035e46273ddaf2aa4e161b8
ALSA: usb: qcom: fix NULL pointer dereference in qmi_stop_session

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@kylinos.cn>
Link: https://patch.msgid.link/86ac2939273ac853535049e60391c09d7688714e.1750755508.git.xiaopei01@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/qcom/qc_audio_offload.c