From bdcfd44fb5b5fb8fd660e7f93f1095c507481024 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sat, 16 Apr 2016 15:30:54 -0300 Subject: Linux-libre 4.5.1-gnu --- sound/usb/clock.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/usb/clock.c') diff --git a/sound/usb/clock.c b/sound/usb/clock.c index 2ed260b10..7ccbcaf6a 100644 --- a/sound/usb/clock.c +++ b/sound/usb/clock.c @@ -285,6 +285,8 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip, int iface, unsigned char data[3]; int err, crate; + if (get_iface_desc(alts)->bNumEndpoints < 1) + return -EINVAL; ep = get_endpoint(alts, 0)->bEndpointAddress; /* if endpoint doesn't have sampling rate control, bail out */ -- cgit v1.2.3-54-g00ecf