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/via82xx_modem.c

    r695 r703  
    370370        while (timeout-- > 0) {
    371371                udelay(1);
    372                 if (!((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY))
     372                val = snd_via82xx_codec_xread(chip);
     373                if (!(val & VIA_REG_AC97_BUSY))
    373374                        return val & 0xffff;
    374375        }
     
    739740        runtime->hw = snd_via82xx_hw;
    740741       
    741         if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
    742                                               &hw_constraints_rates)) < 0)
     742        err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
     743                                         &hw_constraints_rates);
     744        if (err < 0)
    743745                return err;
    744746
    745747        /* we may remove following constaint when we modify table entries
    746748           in interrupt */
    747         if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
     749        err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
     750        if (err < 0)
    748751                return err;
    749752
     
    879882        };
    880883
    881         if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
     884        err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus);
     885        if (err < 0)
    882886                return err;
    883887        chip->ac97_bus->private_free = snd_via82xx_mixer_free_ac97_bus;
     
    891895        ac97.num = chip->ac97_secondary;
    892896
    893         if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
     897        err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97);
     898        if (err < 0)
    894899                return err;
    895900
     
    972977        } while (time_before(jiffies, end_time));
    973978
    974         if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)
     979        val = snd_via82xx_codec_xread(chip);
     980        if (val & VIA_REG_AC97_BUSY)
    975981                dev_err(chip->card->dev,
    976982                        "AC'97 codec is not ready [0x%x]\n", val);
     
    984990                                 (VIA_REG_AC97_CODEC_ID_SECONDARY << VIA_REG_AC97_CODEC_ID_SHIFT));
    985991        do {
    986                 if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_SECONDARY_VALID) {
     992                val = snd_via82xx_codec_xread(chip);
     993                if (val & VIA_REG_AC97_SECONDARY_VALID) {
    987994                        chip->ac97_secondary = 1;
    988995                        goto __ac97_ok2;
     
    10801087        };
    10811088
    1082         if ((err = pci_enable_device(pci)) < 0)
     1089        err = pci_enable_device(pci);
     1090        if (err < 0)
    10831091                return err;
    10841092
    1085         if ((chip = kzalloc(sizeof(*chip), GFP_KERNEL)) == NULL) {
     1093        chip = kzalloc(sizeof(*chip), GFP_KERNEL);
     1094        if (!chip) {
    10861095                pci_disable_device(pci);
    10871096                return -ENOMEM;
     
    10931102        chip->irq = -1;
    10941103
    1095         if ((err = pci_request_regions(pci, card->driver)) < 0) {
     1104        err = pci_request_regions(pci, card->driver);
     1105        if (err < 0) {
    10961106                kfree(chip);
    10971107                pci_disable_device(pci);
     
    11101120                chip->ac97_clock = ac97_clock;
    11111121
    1112         if ((err = snd_via82xx_chip_init(chip)) < 0) {
     1122        err = snd_via82xx_chip_init(chip);
     1123        if (err < 0) {
    11131124                snd_via82xx_free(chip);
    11141125                return err;
    11151126        }
    11161127
    1117         if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
     1128        err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
     1129        if (err < 0) {
    11181130                snd_via82xx_free(chip);
    11191131                return err;
     
    11551167        }
    11561168               
    1157         if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision,
    1158                                       ac97_clock, &chip)) < 0)
     1169        err = snd_via82xx_create(card, pci, chip_type, pci->revision,
     1170                                 ac97_clock, &chip);
     1171        if (err < 0)
    11591172                goto __error;
    11601173        card->private_data = chip;
    1161         if ((err = snd_via82xx_mixer_new(chip)) < 0)
     1174        err = snd_via82xx_mixer_new(chip);
     1175        if (err < 0)
    11621176                goto __error;
    11631177
    1164         if ((err = snd_via686_pcm_new(chip)) < 0 )
     1178        err = snd_via686_pcm_new(chip);
     1179        if (err < 0)
    11651180                goto __error;
    11661181
     
    11741189        snd_via82xx_proc_init(chip);
    11751190
    1176         if ((err = snd_card_register(card)) < 0) {
     1191        err = snd_card_register(card);
     1192        if (err < 0) {
    11771193                snd_card_free(card);
    11781194                return err;
Note: See TracChangeset for help on using the changeset viewer.