From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753050AbWKGMpm (ORCPT ); Tue, 7 Nov 2006 07:45:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753048AbWKGMpm (ORCPT ); Tue, 7 Nov 2006 07:45:42 -0500 Received: from ns1.suse.de ([195.135.220.2]:12930 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S1751345AbWKGMpm (ORCPT ); Tue, 7 Nov 2006 07:45:42 -0500 Date: Tue, 07 Nov 2006 13:45:40 +0100 Message-ID: From: Takashi Iwai To: Adrian Bunk Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, perex@suse.cz Subject: Re: [Alsa-devel] [2.6 patch] sound/core/control.c: remove dead code In-Reply-To: <20061107123806.GE8099@stusta.de> References: <20061106183018.GB8099@stusta.de> <20061107123806.GE8099@stusta.de> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 7 Nov 2006 13:38:06 +0100, Adrian Bunk wrote: > > On Tue, Nov 07, 2006 at 11:43:48AM +0100, Takashi Iwai wrote: > > At Mon, 6 Nov 2006 19:30:18 +0100, > > Adrian Bunk wrote: > > > > > > This patch removes some obviously dead code spotted by the Coverity > > > checker. > > > > > > Signed-off-by: Adrian Bunk > > > > I think it's a wrong fix. result could be > 0 indeed. > > > > Takashi > > > > > > > > --- linux-2.6/sound/core/control.c.old 2006-11-06 19:11:32.000000000 +0100 > > > +++ linux-2.6/sound/core/control.c 2006-11-06 19:11:52.000000000 +0100 > > > @@ -1267,23 +1267,23 @@ static ssize_t snd_ctl_read(struct file > > > if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) { > > That is already checked here -> ^^^^^^^^^^ > > And after this point, result is never assigned any value. Ah, I see. Now applied it to ALSA tree. Thanks. Takashi