diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-10-10 05:56:31 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:18:00 -0500 |
commit | b1d5776d865951c213a1caaab5d8bf5de7615dbd (patch) | |
tree | f999dca30f6e2d03a9176b86c613ae8f4531a6d6 /sound/pci/cmipci.c | |
parent | 93f2e37840a9a7c3693ca6961fe6ad46b250f3b9 (diff) |
[ALSA] Remove vmalloc wrapper, kfree_nocheck()
- Remove vmalloc wrapper
- Add release_and_free_resource() to remove kfree_nocheck() from each driver
and simplify the code
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cmipci.c')
-rw-r--r-- | sound/pci/cmipci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 316afb78488d..db093bca2cd0 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -2683,8 +2683,7 @@ static int __devinit snd_cmipci_create_gameport(cmipci_t *cm, int dev) | |||
2683 | cm->gameport = gp = gameport_allocate_port(); | 2683 | cm->gameport = gp = gameport_allocate_port(); |
2684 | if (!gp) { | 2684 | if (!gp) { |
2685 | printk(KERN_ERR "cmipci: cannot allocate memory for gameport\n"); | 2685 | printk(KERN_ERR "cmipci: cannot allocate memory for gameport\n"); |
2686 | release_resource(r); | 2686 | release_and_free_resource(r); |
2687 | kfree_nocheck(r); | ||
2688 | return -ENOMEM; | 2687 | return -ENOMEM; |
2689 | } | 2688 | } |
2690 | gameport_set_name(gp, "C-Media Gameport"); | 2689 | gameport_set_name(gp, "C-Media Gameport"); |
@@ -2709,8 +2708,7 @@ static void snd_cmipci_free_gameport(cmipci_t *cm) | |||
2709 | cm->gameport = NULL; | 2708 | cm->gameport = NULL; |
2710 | 2709 | ||
2711 | snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); | 2710 | snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); |
2712 | release_resource(r); | 2711 | release_and_free_resource(r); |
2713 | kfree_nocheck(r); | ||
2714 | } | 2712 | } |
2715 | } | 2713 | } |
2716 | #else | 2714 | #else |