aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index b2779fb7d1a9..b0302c369c3d 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1655,8 +1655,7 @@ static int __devinit snd_via686_create_gameport(via82xx_t *chip, unsigned char *
1655 chip->gameport = gp = gameport_allocate_port(); 1655 chip->gameport = gp = gameport_allocate_port();
1656 if (!gp) { 1656 if (!gp) {
1657 printk(KERN_ERR "via82xx: cannot allocate memory for gameport\n"); 1657 printk(KERN_ERR "via82xx: cannot allocate memory for gameport\n");
1658 release_resource(r); 1658 release_and_free_resource(r);
1659 kfree_nocheck(r);
1660 return -ENOMEM; 1659 return -ENOMEM;
1661 } 1660 }
1662 1661
@@ -1682,8 +1681,7 @@ static void snd_via686_free_gameport(via82xx_t *chip)
1682 1681
1683 gameport_unregister_port(chip->gameport); 1682 gameport_unregister_port(chip->gameport);
1684 chip->gameport = NULL; 1683 chip->gameport = NULL;
1685 release_resource(r); 1684 release_and_free_resource(r);
1686 kfree_nocheck(r);
1687 } 1685 }
1688} 1686}
1689#else 1687#else
@@ -2023,10 +2021,7 @@ static int snd_via82xx_free(via82xx_t *chip)
2023 __end_hw: 2021 __end_hw:
2024 if (chip->irq >= 0) 2022 if (chip->irq >= 0)
2025 free_irq(chip->irq, (void *)chip); 2023 free_irq(chip->irq, (void *)chip);
2026 if (chip->mpu_res) { 2024 release_and_free_resource(chip->mpu_res);
2027 release_resource(chip->mpu_res);
2028 kfree_nocheck(chip->mpu_res);
2029 }
2030 pci_release_regions(chip->pci); 2025 pci_release_regions(chip->pci);
2031 2026
2032 if (chip->chip_type == TYPE_VIA686) { 2027 if (chip->chip_type == TYPE_VIA686) {