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

    r695 r703  
    668668                                           &hw_constraints_channels);
    669669        }
    670         if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
     670        err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
     671        if (err < 0)
    671672                return err;
    672673        return 0;
     
    683684        snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
    684685                                   &hw_constraints_rates);
    685         if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
     686        err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
     687        if (err < 0)
    686688                return err;
    687689        return 0;
     
    726728        int err;
    727729
    728         if ((err = snd_pcm_new(chip->card, "FM801", device, 1, 1, &pcm)) < 0)
     730        err = snd_pcm_new(chip->card, "FM801", device, 1, 1, &pcm);
     731        if (err < 0)
    729732                return err;
    730733
     
    994997        unsigned short val;
    995998 
    996         if ((val = ucontrol->value.enumerated.item[0]) > 4)
     999        val = ucontrol->value.enumerated.item[0];
     1000        if (val > 4)
    9971001                return -EINVAL;
    9981002        return snd_fm801_update_bits(chip, FM801_REC_SRC, 7, val);
     
    10591063        };
    10601064
    1061         if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
     1065        err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus);
     1066        if (err < 0)
    10621067                return err;
    10631068        chip->ac97_bus->private_free = snd_fm801_mixer_free_ac97_bus;
     
    10661071        ac97.private_data = chip;
    10671072        ac97.private_free = snd_fm801_mixer_free_ac97;
    1068         if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
     1073        err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97);
     1074        if (err < 0)
    10691075                return err;
    10701076        if (chip->secondary) {
    10711077                ac97.num = 1;
    10721078                ac97.addr = chip->secondary_addr;
    1073                 if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_sec)) < 0)
     1079                err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97_sec);
     1080                if (err < 0)
    10741081                        return err;
    10751082        }
     
    12231230        *rchip = NULL;
    12241231#ifndef TARGET_OS2
    1225         if ((err = pcim_enable_device(pci)) < 0)
     1232        err = pcim_enable_device(pci);
     1233        if (err < 0)
    12261234                return err;
    12271235        chip = devm_kzalloc(&pci->dev, sizeof(*chip), GFP_KERNEL);
     
    12381246        chip->irq = -1;
    12391247        chip->tea575x_tuner = tea575x_tuner;
    1240         if ((err = pci_request_regions(pci, "FM801")) < 0)
     1248        err = pci_request_regions(pci, "FM801");
     1249        if (err < 0)
    12411250                return err;
    12421251        chip->port = pci_resource_start(pci, 0);
     
    12781287        snd_fm801_chip_init(chip);
    12791288
    1280         if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
     1289        err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
     1290        if (err < 0) {
    12811291                snd_fm801_free(chip);
    12821292                return err;
     
    13511361        if (err < 0)
    13521362                return err;
    1353         if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip)) < 0) {
     1363        err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip);
     1364        if (err < 0) {
    13541365                snd_card_free(card);
    13551366                return err;
     
    13661377                goto __fm801_tuner_only;
    13671378
    1368         if ((err = snd_fm801_pcm(chip, 0)) < 0) {
     1379        err = snd_fm801_pcm(chip, 0);
     1380        if (err < 0) {
    13691381                snd_card_free(card);
    13701382                return err;
    13711383        }
    1372         if ((err = snd_fm801_mixer(chip)) < 0) {
     1384        err = snd_fm801_mixer(chip);
     1385        if (err < 0) {
    13731386                snd_card_free(card);
    13741387                return err;
    13751388        }
    1376         if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_FM801,
    1377                                        chip->port + FM801_MPU401_DATA,
    1378                                        MPU401_INFO_INTEGRATED |
    1379                                        MPU401_INFO_IRQ_HOOK,
    1380                                        -1, &chip->rmidi)) < 0) {
     1389        err = snd_mpu401_uart_new(card, 0, MPU401_HW_FM801,
     1390                                  chip->port + FM801_MPU401_DATA,
     1391                                  MPU401_INFO_INTEGRATED |
     1392                                  MPU401_INFO_IRQ_HOOK,
     1393                                  -1, &chip->rmidi);
     1394        if (err < 0) {
    13811395                snd_card_free(card);
    13821396                return err;
    13831397        }
    1384         if ((err = snd_opl3_create(card, chip->port + FM801_OPL3_BANK0,
    1385                                    chip->port + FM801_OPL3_BANK1,
    1386                                    OPL3_HW_OPL3_FM801, 1, &opl3)) < 0) {
     1398        err = snd_opl3_create(card, chip->port + FM801_OPL3_BANK0,
     1399                              chip->port + FM801_OPL3_BANK1,
     1400                              OPL3_HW_OPL3_FM801, 1, &opl3);
     1401        if (err < 0) {
    13871402                snd_card_free(card);
    13881403                return err;
    13891404        }
    1390         if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
     1405        err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
     1406        if (err < 0) {
    13911407                snd_card_free(card);
    13921408                return err;
     
    13941410
    13951411      __fm801_tuner_only:
    1396         if ((err = snd_card_register(card)) < 0) {
     1412        err = snd_card_register(card);
     1413        if (err < 0) {
    13971414                snd_card_free(card);
    13981415                return err;
Note: See TracChangeset for help on using the changeset viewer.