Re: [2.6 patch] sound/oss/cs46xx.c: fix a check after use
On Wed, Apr 13, 2005 at 04:17:39AM +0200, Adrian Bunk wrote: > This patch fixes a check after use found by the Coverity checker. NAK. Please, read the surrounding code. All places that can call that function have form ->amplifier_ctrl(,...); so we _can't_ get NULL first argument. The check should be removed - it's not paranoia, it's simple stupidity. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[2.6 patch] sound/oss/cs46xx.c: fix a check after use
This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- This patch was already sent on: - 27 Mar 2005 --- linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c.old2005-03-23 04:48:53.0 +0100 +++ linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c2005-03-23 04:49:31.0 +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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[2.6 patch] sound/oss/cs46xx.c: fix a check after use
This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- This patch was already sent on: - 27 Mar 2005 --- linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c.old2005-03-23 04:48:53.0 +0100 +++ linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c2005-03-23 04:49:31.0 +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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [2.6 patch] sound/oss/cs46xx.c: fix a check after use
On Wed, Apr 13, 2005 at 04:17:39AM +0200, Adrian Bunk wrote: This patch fixes a check after use found by the Coverity checker. NAK. Please, read the surrounding code. All places that can call that function have form expression-amplifier_ctrl(same expression,...); so we _can't_ get NULL first argument. The check should be removed - it's not paranoia, it's simple stupidity. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[2.6 patch] sound/oss/cs46xx.c: fix a check after use
This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c.old2005-03-23 04:48:53.0 +0100 +++ linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c2005-03-23 04:49:31.0 +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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[2.6 patch] sound/oss/cs46xx.c: fix a check after use
This patch fixes a check after use found by the Coverity checker. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c.old2005-03-23 04:48:53.0 +0100 +++ linux-2.6.12-rc1-mm1-full/sound/oss/cs46xx.c2005-03-23 04:49:31.0 +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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/