From: Takashi Iwai Subject: Re: [2.6 patch] sound/core/control.c: remove dead code Date: Tue, 07 Nov 2006 11:43:48 +0100 Message-ID: References: <20061106183018.GB8099@stusta.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id 04F6A234 for ; Tue, 7 Nov 2006 11:43:49 +0100 (MET) In-Reply-To: <20061106183018.GB8099@stusta.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Adrian Bunk Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, perex@suse.cz List-Id: alsa-devel@alsa-project.org 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) { > err = -EAGAIN; > goto __end_lock; > } > init_waitqueue_entry(&wait, current); > add_wait_queue(&ctl->change_sleep, &wait); > set_current_state(TASK_INTERRUPTIBLE); > spin_unlock_irq(&ctl->read_lock); > schedule(); > remove_wait_queue(&ctl->change_sleep, &wait); > if (signal_pending(current)) > - return result > 0 ? result : -ERESTARTSYS; > + return -ERESTARTSYS; > spin_lock_irq(&ctl->read_lock); > } > kev = snd_kctl_event(ctl->events.next); > ev.type = SNDRV_CTL_EVENT_ELEM; > ev.data.elem.mask = kev->mask; > ev.data.elem.id = kev->id; > list_del(&kev->list); > spin_unlock_irq(&ctl->read_lock); > kfree(kev); > if (copy_to_user(buffer, &ev, sizeof(struct snd_ctl_event))) { > err = -EFAULT; > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642