[PATCH] sound/oss/sscape.c: remove dead code
authorAdrian Bunk <bunk@stusta.de>
Sat, 25 Jun 2005 21:59:02 +0000 (14:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:25:03 +0000 (16:25 -0700)
The Coverity checker found that sscape_sb_enable never get's assigned any
value different from 0, and therefore some code paths are impossible.

This patch removes this variable and the dead code paths.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/sscape.c

index 50ca646294502a4e1d5dbf84d757684bfcc5e77f..9ed5211c3168156f05f8d0f9e89d4191c9f48c2e 100644 (file)
@@ -991,7 +991,6 @@ static void __init sscape_pnp_init_hw(sscape_info* devc)
        unsigned i;
        static  char code_file_name[23] = "/sndscape/sndscape.cox";
        
-       int sscape_sb_enable            = 0;
        int sscape_joystic_enable       = 0x7f;
        int sscape_mic_enable           = 0;
        int sscape_ext_midi             = 0;            
@@ -1015,14 +1014,9 @@ static void __init sscape_pnp_init_hw(sscape_info* devc)
        sscape_write( devc, 2, devc->ic_type == IC_ODIE ? 0x70 : 0x40);
        sscape_write( devc, 3, ( devc -> dma << 4) | 0x80);
 
-       if ( sscape_sb_enable )
-               sscape_write (devc, 4, 0xF0 | (sb_irq << 2) | midi_irq);
-       else    
-               sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
+       sscape_write (devc, 4, 0xF0 | (midi_irq<<2) | midi_irq);
 
        i = 0x10; //sscape_read(devc, 9) & (devc->ic_type == IC_ODIE ? 0xf0 : 0xc0);
-       if ( sscape_sb_enable )
-               i |= devc->ic_type == IC_ODIE ? 0x05 : 0x07;        
        if (sscape_joystic_enable) i |= 8;
        
        sscape_write (devc, 9, i);