Skip to content
Commit 31be5425 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usb-audio: Fix NULL dereference by access to non-existing substream



The commit [0d9741c0: ALSA: usb-audio: sync ep init fix for
audioformat mismatch] introduced the correction of parameters to be
set for sync EP.  But since the new code assumes that the sync EP is
always paired with the data EP of another direction, it triggers Oops
when a device only with a single direction is used.

This patch adds a proper check of sync EP type and the presence of the
paired substream for avoiding the crash.

Reported-and-tested-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c18ab0ba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment