Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261586AbVC0Ux2 (ORCPT ); Sun, 27 Mar 2005 15:53:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261587AbVC0Uvs (ORCPT ); Sun, 27 Mar 2005 15:51:48 -0500 Received: from emailhub.stusta.mhn.de ([141.84.69.5]:35856 "HELO mailout.stusta.mhn.de") by vger.kernel.org with SMTP id S261578AbVC0UuS (ORCPT ); Sun, 27 Mar 2005 15:50:18 -0500 Date: Sun, 27 Mar 2005 22:50:14 +0200 From: Adrian Bunk To: linux-kernel@vger.kernel.org Subject: [2.6 patch] sound/oss/cs46xx.c: fix a check after use Message-ID: <20050327205014.GD4285@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 913 Lines: 28 This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk --- linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c.old 2005-03-23 04:48:53.000000000 +0100 +++ linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c 2005-03-23 04:49:31.000000000 +0100 @@ -3086,13 +3086,14 @@ static void amp_hercules(struct cs_card *card, int change) { - int old=card->amplifier; + int old; if(!card) { CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO "cs46xx: amp_hercules() called before initialized.\n")); return; } + old = card->amplifier; card->amplifier+=change; if( (card->amplifier && !old) && !(hercules_egpio_disable)) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/