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:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/drivers/opl3/opl3_lib.c

    r679 r703  
    244244        tid.device = timer_no;
    245245        tid.subdevice = 0;
    246         if ((err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer)) >= 0) {
     246        err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer);
     247        if (err >= 0) {
    247248                strcpy(timer->name, "AdLib timer #1");
    248249                timer->private_data = opl3;
     
    264265        tid.device = timer_no;
    265266        tid.subdevice = 0;
    266         if ((err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer)) >= 0) {
     267        err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer);
     268        if (err >= 0) {
    267269                strcpy(timer->name, "AdLib timer #2");
    268270                timer->private_data = opl3;
     
    349351        spin_lock_init(&opl3->timer_lock);
    350352
    351         if ((err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops)) < 0) {
     353        err = snd_device_new(card, SNDRV_DEV_CODEC, opl3, &ops);
     354        if (err < 0) {
    352355                snd_opl3_free(opl3);
    353356                return err;
     
    397400
    398401        *ropl3 = NULL;
    399         if ((err = snd_opl3_new(card, hardware, &opl3)) < 0)
     402        err = snd_opl3_new(card, hardware, &opl3);
     403        if (err < 0)
    400404                return err;
    401405        if (! integrated) {
    402                 if ((opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)")) == NULL) {
     406                opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)");
     407                if (!opl3->res_l_port) {
    403408                        snd_printk(KERN_ERR "opl3: can't grab left port 0x%lx\n", l_port);
    404409                        snd_device_free(card, opl3);
    405410                        return -EBUSY;
    406411                }
    407                 if (r_port != 0 &&
    408                     (opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)")) == NULL) {
    409                         snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port);
    410                         snd_device_free(card, opl3);
    411                         return -EBUSY;
     412                if (r_port != 0) {
     413                        opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)");
     414                        if (!opl3->res_r_port) {
     415                                snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port);
     416                                snd_device_free(card, opl3);
     417                                return -EBUSY;
     418                        }
    412419                }
    413420        }
     
    424431        default:
    425432                opl3->command = &snd_opl2_command;
    426                 if ((err = snd_opl3_detect(opl3)) < 0) {
     433                err = snd_opl3_detect(opl3);
     434                if (err < 0) {
    427435                        snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
    428436                                   opl3->l_port, opl3->r_port);
     
    450458        int err;
    451459
    452         if (timer1_dev >= 0)
    453                 if ((err = snd_opl3_timer1_init(opl3, timer1_dev)) < 0)
     460        if (timer1_dev >= 0) {
     461                err = snd_opl3_timer1_init(opl3, timer1_dev);
     462                if (err < 0)
    454463                        return err;
     464        }
    455465        if (timer2_dev >= 0) {
    456                 if ((err = snd_opl3_timer2_init(opl3, timer2_dev)) < 0) {
     466                err = snd_opl3_timer2_init(opl3, timer2_dev);
     467                if (err < 0) {
    457468                        snd_device_free(opl3->card, opl3->timer1);
    458469                        opl3->timer1 = NULL;
     
    478489        /* create hardware dependent device (direct FM) */
    479490
    480         if ((err = snd_hwdep_new(card, "OPL2/OPL3", device, &hw)) < 0) {
     491        err = snd_hwdep_new(card, "OPL2/OPL3", device, &hw);
     492        if (err < 0) {
    481493                snd_device_free(card, opl3);
    482494                return err;
  • GPL/trunk/alsa-kernel/drivers/opl3/opl3_midi.c

    r679 r703  
    181181                                /* kill two voices, EXPENSIVE */
    182182                                bp++;
    183                                 voice_time = (voice_time > vp->time) ?
    184                                         voice_time : vp->time;
     183                                voice_time = max(voice_time, vp2->time);
    185184                        }
    186185                } else {
  • GPL/trunk/alsa-kernel/drivers/opl3/opl3_seq.c

    r679 r703  
    9696        int err;
    9797
    98         if ((err = snd_opl3_synth_setup(opl3)) < 0)
     98        err = snd_opl3_synth_setup(opl3);
     99        if (err < 0)
    99100                return err;
    100101
     
    111112
    112113        if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) {
    113                 if ((err = snd_opl3_synth_use_inc(opl3)) < 0)
     114                err = snd_opl3_synth_use_inc(opl3);
     115                if (err < 0)
    114116                        return err;
    115117        }
     
    231233                return client;
    232234
    233         if ((err = snd_opl3_synth_create_port(opl3)) < 0) {
     235        err = snd_opl3_synth_create_port(opl3);
     236        if (err < 0) {
    234237                snd_seq_delete_kernel_client(client);
    235238                opl3->seq_client = -1;
Note: See TracChangeset for help on using the changeset viewer.