Skip to content

Commit

Permalink
sound: oss: Deletion of unnecessary checks before the function call "…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
elfring authored and tiwai committed Jan 4, 2015
1 parent 57dca36 commit d1f45e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sound/oss/pss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion sound/oss/trix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d1f45e6

Please sign in to comment.