]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sound: oss: Deletion of unnecessary checks before the function call "vfree"
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jan 2015 14:10:52 +0000 (15:10 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 4 Jan 2015 14:11:56 +0000 (15:11 +0100)
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/oss/pss.c
sound/oss/trix.c

index ca0d6e9f49f5b4a7895a0e1c99408db528b7db80..81314f9e2ccb9c8bffccdc699cca698820081625 100644 (file)
@@ -1228,7 +1228,7 @@ static void __exit cleanup_pss(void)
 {
        if(!pss_no_sound)
        {
-               if(fw_load && pss_synth)
+               if (fw_load)
                        vfree(pss_synth);
                if(pssmss)
                        unload_pss_mss(&cfg2);
index 944e0c0154853d8fb31fe4cfa3fbf1b963a3137e..3c494dc93b936d4680aca2a70ccee94d1fba7938 100644 (file)
@@ -487,7 +487,7 @@ static int __init init_trix(void)
 
 static void __exit cleanup_trix(void)
 {
-       if (fw_load && trix_boot)
+       if (fw_load)
                vfree(trix_boot);
        if (sb)
                unload_trix_sb(&cfg2);