[2.6 patch] sound/oss/cs46xx.c: fix a check after use

From: Adrian Bunk (bunk_at_stusta.de)
Date: 03/27/05

  • Next message: Barry K. Nathan: "Re: BK snapshots removed from kernel.org?"
    Date:	Sun, 27 Mar 2005 22:50:14 +0200
    To: linux-kernel@vger.kernel.org
    
    

    This patch fixes a check after use found by the Coverity checker.

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- 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/


  • Next message: Barry K. Nathan: "Re: BK snapshots removed from kernel.org?"

    Relevant Pages

    • Re: Experience with Dell Inspiron 1150 laptop?
      ... >> drove over there. ... The prices I was quoted when I purchased: ... anything but the card... ... To unsubscribe, ...
      (freebsd-questions)
    • Re: Best Video Card
      ... support a graphics manufacturer who opens their specs as much as ... what are everyones thoughts about which card that might be? ... Thank you very much for posting this. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: ESS ES1868 sound card not working after update to Etch
      ... ESS chip ES1868 detected ... I have the same card and finally solved the problems. ... Run alsaconf and alsactl. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: [FIXED] Re: lirc on Debian with AMD64
      ... that event number could easily change from boot to boot. ... If there is more than one card that could match the ATTRSfield, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: VIA OnBoard NIC problems
      ... I'm running 5.2 right now with a VIA EPIA 800 setup. ... card, vr0, and it seems to work so far, then again I don't have ... >> To unsubscribe, send any mail to ...
      (freebsd-questions)