فهرست منبع

sound: oss: Deletion of unnecessary checks before the function call "vfree"

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>
Markus Elfring 11 سال پیش
والد
کامیت
d1f45e6037
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      sound/oss/pss.c
  2. 1 1
      sound/oss/trix.c

+ 1 - 1
sound/oss/pss.c

@@ -1228,7 +1228,7 @@ static void __exit cleanup_pss(void)
 {
 {
 	if(!pss_no_sound)
 	if(!pss_no_sound)
 	{
 	{
-		if(fw_load && pss_synth)
+		if (fw_load)
 			vfree(pss_synth);
 			vfree(pss_synth);
 		if(pssmss)
 		if(pssmss)
 			unload_pss_mss(&cfg2);
 			unload_pss_mss(&cfg2);

+ 1 - 1
sound/oss/trix.c

@@ -487,7 +487,7 @@ static int __init init_trix(void)
 
 
 static void __exit cleanup_trix(void)
 static void __exit cleanup_trix(void)
 {
 {
-	if (fw_load && trix_boot)
+	if (fw_load)
 		vfree(trix_boot);
 		vfree(trix_boot);
 	if (sb)
 	if (sb)
 		unload_trix_sb(&cfg2);
 		unload_trix_sb(&cfg2);