Ignore:
Timestamp:
Sep 26, 2021, 6:18:40 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/pci/es1938.c

    r695 r703  
    297297        unsigned char v;
    298298        for (i = 0; i < WRITE_LOOP_TIMEOUT; i++) {
    299                 if (!(v = inb(SLSB_REG(chip, READSTATUS)) & 0x80)) {
     299                v = inb(SLSB_REG(chip, READSTATUS));
     300                if (!(v & 0x80)) {
    300301                        outb(cmd, SLSB_REG(chip, WRITEDATA));
    301302                        return;
     
    313314        int i;
    314315        unsigned char v;
    315         for (i = GET_LOOP_TIMEOUT; i; i--)
    316                 if ((v = inb(SLSB_REG(chip, STATUS))) & 0x80)
     316        for (i = GET_LOOP_TIMEOUT; i; i--) {
     317                v = inb(SLSB_REG(chip, STATUS));
     318                if (v & 0x80)
    317319                        return inb(SLSB_REG(chip, READDATA));
     320        }
    318321        dev_err(chip->card->dev, "get_byte timeout: status 0x02%x\n", v);
    319322        return -ENODEV;
     
    9971000        int err;
    9981001
    999         if ((err = snd_pcm_new(chip->card, "es-1938-1946", device, 2, 1, &pcm)) < 0)
     1002        err = snd_pcm_new(chip->card, "es-1938-1946", device, 2, 1, &pcm);
     1003        if (err < 0)
    10001004                return err;
    10011005        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_es1938_playback_ops);
     
    15891593
    15901594        /* enable PCI device */
    1591         if ((err = pci_enable_device(pci)) < 0)
     1595        err = pci_enable_device(pci);
     1596        if (err < 0)
    15921597                return err;
    15931598        /* check, if we can restrict PCI DMA transfers to 24 bits */
     
    16091614        chip->pci = pci;
    16101615        chip->irq = -1;
    1611         if ((err = pci_request_regions(pci, "ESS Solo-1")) < 0) {
     1616        err = pci_request_regions(pci, "ESS Solo-1");
     1617        if (err < 0) {
    16121618                kfree(chip);
    16131619                pci_disable_device(pci);
     
    16351641        snd_es1938_chip_init(chip);
    16361642
    1637         if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
     1643        err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
     1644        if (err < 0) {
    16381645                snd_es1938_free(chip);
    16391646                return err;
     
    17671774                                break;
    17681775                        }
    1769                 if ((err = snd_ctl_add(card, kctl)) < 0)
     1776                err = snd_ctl_add(card, kctl);
     1777                if (err < 0)
    17701778                        return err;
    17711779        }
     
    18011809                }
    18021810        }
    1803         if ((err = snd_es1938_create(card, pci, &chip)) < 0) {
     1811        err = snd_es1938_create(card, pci, &chip);
     1812        if (err < 0) {
    18041813                snd_card_free(card);
    18051814                return err;
     
    18141823                chip->irq);
    18151824
    1816         if ((err = snd_es1938_new_pcm(chip, 0)) < 0) {
     1825        err = snd_es1938_new_pcm(chip, 0);
     1826        if (err < 0) {
    18171827                snd_card_free(card);
    18181828                return err;
    18191829        }
    1820         if ((err = snd_es1938_mixer(chip)) < 0) {
     1830        err = snd_es1938_mixer(chip);
     1831        if (err < 0) {
    18211832                snd_card_free(card);
    18221833                return err;
     
    18291840                           SLSB_REG(chip, FMLOWADDR));
    18301841        } else {
    1831                 if ((err = snd_opl3_timer_new(opl3, 0, 1)) < 0) {
     1842                err = snd_opl3_timer_new(opl3, 0, 1);
     1843                if (err < 0) {
    18321844                        snd_card_free(card);
    18331845                        return err;
    18341846                }
    1835                 if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
     1847                err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
     1848                if (err < 0) {
    18361849                        snd_card_free(card);
    18371850                        return err;
     
    18511864        snd_es1938_create_gameport(chip);
    18521865
    1853         if ((err = snd_card_register(card)) < 0) {
     1866        err = snd_card_register(card);
     1867        if (err < 0) {
    18541868                snd_card_free(card);
    18551869                return err;
Note: See TracChangeset for help on using the changeset viewer.