diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2006-03-28 04:56:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-28 12:16:08 -0500 |
commit | 07e0e93d9a3cdbe3cad450e0d0a2937585dffc55 (patch) | |
tree | ea4ab1d1b81ffb43eec99b949a0be01e20abe816 /sound | |
parent | 457d3d432bede99ed04d3bdeb5efb238a3627e8f (diff) |
[PATCH] maestro3 vfree NULL check fixup
vfree() checks for NULL, no need to do it explicitly.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Zach Brown <zab@zabbo.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/oss/maestro3.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/oss/maestro3.c b/sound/oss/maestro3.c index 66044aff2586..4a5e4237a110 100644 --- a/sound/oss/maestro3.c +++ b/sound/oss/maestro3.c | |||
@@ -2582,15 +2582,9 @@ static int alloc_dsp_suspendmem(struct m3_card *card) | |||
2582 | 2582 | ||
2583 | return 0; | 2583 | return 0; |
2584 | } | 2584 | } |
2585 | static void free_dsp_suspendmem(struct m3_card *card) | ||
2586 | { | ||
2587 | if(card->suspend_mem) | ||
2588 | vfree(card->suspend_mem); | ||
2589 | } | ||
2590 | 2585 | ||
2591 | #else | 2586 | #else |
2592 | #define alloc_dsp_suspendmem(args...) 0 | 2587 | #define alloc_dsp_suspendmem(args...) 0 |
2593 | #define free_dsp_suspendmem(args...) | ||
2594 | #endif | 2588 | #endif |
2595 | 2589 | ||
2596 | /* | 2590 | /* |
@@ -2717,7 +2711,7 @@ out: | |||
2717 | if(ret) { | 2711 | if(ret) { |
2718 | if(card->iobase) | 2712 | if(card->iobase) |
2719 | release_region(pci_resource_start(pci_dev, 0), pci_resource_len(pci_dev, 0)); | 2713 | release_region(pci_resource_start(pci_dev, 0), pci_resource_len(pci_dev, 0)); |
2720 | free_dsp_suspendmem(card); | 2714 | vfree(card->suspend_mem); |
2721 | if(card->ac97) { | 2715 | if(card->ac97) { |
2722 | unregister_sound_mixer(card->ac97->dev_mixer); | 2716 | unregister_sound_mixer(card->ac97->dev_mixer); |
2723 | kfree(card->ac97); | 2717 | kfree(card->ac97); |
@@ -2760,7 +2754,7 @@ static void m3_remove(struct pci_dev *pci_dev) | |||
2760 | } | 2754 | } |
2761 | 2755 | ||
2762 | release_region(card->iobase, 256); | 2756 | release_region(card->iobase, 256); |
2763 | free_dsp_suspendmem(card); | 2757 | vfree(card->suspend_mem); |
2764 | kfree(card); | 2758 | kfree(card); |
2765 | } | 2759 | } |
2766 | devs = NULL; | 2760 | devs = NULL; |