From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbdK0J7m (ORCPT ); Mon, 27 Nov 2017 04:59:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:35849 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751776AbdK0J7l (ORCPT ); Mon, 27 Nov 2017 04:59:41 -0500 Date: Mon, 27 Nov 2017 10:59:40 +0100 Message-ID: From: Takashi Iwai To: =?UTF-8?B?SsO2cmc=?= Otte Cc: torvalds@linuxfoundation.org, Linux Kernel Mailing List Subject: Re: v15-rc1 regression: No sound via usb-audio In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Nov 2017 09:23:11 +0100, Jörg Otte wrote: > > With v15-rc1 "alsamixer" has no volume control for usb sound boxes. > The sound boxes have been working well for years so this a regression. > > Reverting commit: > 8428a8e: "ALSA: usb-audio: Fix potential zero-division at parsing FU" > > fixes the problem for me completely. Argh, reading back the changes again, the patch looks really bogus. Sorry for the mess. Linus, could you simply revert the one? I can include it in the next pull request, but it's likely easier / faster to do it in your side. thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] Revert "ALSA: usb-audio: Fix potential zero-division at parsing FU" The commit 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division at parsing FU") is utterly bogus and breaks the case with csize=1 instead of fixing anything. Just take it back again. Reported-by: Jörg Otte Fixes: 8428a8ebde2d ("ALSA: usb-audio: Fix potential zero-division at parsing FU" Signed-off-by: Takashi Iwai --- sound/usb/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 0537c6322990..61b348383de8 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -1476,9 +1476,9 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, return -EINVAL; } csize = hdr->bControlSize; - if (csize <= 1) { + if (!csize) { usb_audio_dbg(state->chip, - "unit %u: invalid bControlSize <= 1\n", + "unit %u: invalid bControlSize == 0\n", unitid); return -EINVAL; } -- 2.15.0