]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/es1938.c
fat: Fix _fat_bmap() race
[linux-2.6-omap-h63xx.git] / sound / pci / es1938.c
index 1a314fa99c45889148c07b3d95609496b2e19c76..4cd9a1faaecc186732b1ad911ebfd74e3c59e77e 100644 (file)
@@ -860,7 +860,8 @@ static int snd_es1938_capture_copy(struct snd_pcm_substream *substream,
        struct es1938 *chip = snd_pcm_substream_chip(substream);
        pos <<= chip->dma1_shift;
        count <<= chip->dma1_shift;
-       snd_assert(pos + count <= chip->dma1_size, return -EINVAL);
+       if (snd_BUG_ON(pos + count > chip->dma1_size))
+               return -EINVAL;
        if (pos + count < chip->dma1_size) {
                if (copy_to_user(dst, runtime->dma_area + pos + 1, count))
                        return -EFAULT;
@@ -1488,7 +1489,6 @@ static int es1938_suspend(struct pci_dev *pci, pm_message_t state)
 
        outb(0x00, SLIO_REG(chip, IRQCONTROL)); /* disable irqs */
        if (chip->irq >= 0) {
-               synchronize_irq(chip->irq);
                free_irq(chip->irq, chip);
                chip->irq = -1;
        }
@@ -1578,10 +1578,8 @@ static int snd_es1938_free(struct es1938 *chip)
 
        snd_es1938_free_gameport(chip);
 
-       if (chip->irq >= 0) {
-               synchronize_irq(chip->irq);
+       if (chip->irq >= 0)
                free_irq(chip->irq, chip);
-       }
        pci_release_regions(chip->pci);
        pci_disable_device(chip->pci);
        kfree(chip);