Changeset 771 for GPL/branches
- Timestamp:
- Apr 15, 2025, 11:31:12 AM (4 months ago)
- Location:
- GPL/branches/uniaud32-exp
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-exp/alsa-kernel/core/control.c
r767 r771 956 956 } 957 957 offset = 0; 958 }959 958 } 959 } 960 960 out: 961 961 up_read(&card->controls_rwsem); … … 1313 1313 snd_power_unref(card); 1314 1314 if (result < 0) 1315 return result;1315 goto error; 1316 1316 1317 1317 if (copy_to_user(_control, control, sizeof(*control))) 1318 return -EFAULT; 1318 result = -EFAULT; 1319 error: 1320 kfree(control); 1319 1321 return result; 1320 1322 } … … 1389 1391 result = snd_power_ref_and_wait(card); 1390 1392 if (result < 0) 1391 return result;1393 goto error; 1392 1394 result = snd_ctl_elem_write(card, file, control); 1393 1395 snd_power_unref(card); 1394 1396 if (result < 0) 1395 return result;1397 goto error; 1396 1398 1397 1399 if (copy_to_user(_control, control, sizeof(*control))) 1398 return -EFAULT; 1400 result = -EFAULT; 1401 error: 1402 kfree(control); 1399 1403 return result; 1400 1404 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/oss/pcm_oss.c
r767 r771 415 415 goto _end; 416 416 params1 = kmalloc(sizeof(*params1), GFP_KERNEL); 417 if (params1 == NULL) 417 if (params1 == NULL) { 418 kfree(save); 418 419 return -ENOMEM; 420 } 419 421 *params1 = *save; 420 422 max = snd_pcm_hw_param_max(pcm, params1, var, max, &maxdir); 421 if (max < 0) 423 if (max < 0) { 424 kfree(params1); 422 425 goto _end; 426 } 423 427 if (boundary_nearer(max, maxdir, best, valdir, min, mindir)) { 424 428 *params = *params1; 425 429 last = 1; 426 430 } 431 kfree(params1); 427 432 } else { 428 433 *params = *save; 429 434 max = snd_pcm_hw_param_max(pcm, params, var, max, &maxdir); 430 if (max < 0) 435 if (max < 0) { 436 kfree(save); 431 437 return max; 438 } 432 439 last = 1; 433 440 } 434 441 _end: 442 kfree(save); 435 443 if (last) 436 444 v = snd_pcm_hw_param_last(pcm, params, var, dir); … … 810 818 SNDRV_PCM_HW_PARAM_RATE, 811 819 rate, 0); 812 if (ret == (int)rate) 820 if (ret == (int)rate) { 821 kfree(save); 813 822 return rate; 823 } 814 824 *params = *save; 815 825 } … … 821 831 822 832 /* not found, use the nearest rate */ 833 kfree(save); 823 834 return snd_pcm_hw_param_near(substream, params, SNDRV_PCM_HW_PARAM_RATE, best_rate, NULL); 824 835 } … … 1876 1887 err = snd_pcm_hw_refine(substream, params); 1877 1888 if (err < 0) 1878 return err;1889 goto error; 1879 1890 format_mask = hw_param_mask_c(params, SNDRV_PCM_HW_PARAM_FORMAT); 1880 1891 for (fmt = 0; fmt < 32; ++fmt) { … … 1886 1897 } 1887 1898 1888 return formats; 1899 error: 1900 kfree(params); 1901 return err < 0 ? err : formats; 1889 1902 } 1890 1903 -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm.c
r770 r771 359 359 if (err < 0) { 360 360 snd_iprintf(buffer, "error %d\n", err); 361 kfree(info); 361 362 return; 362 363 } … … 372 373 snd_iprintf(buffer, "subdevices_count: %d\n", info->subdevices_count); 373 374 snd_iprintf(buffer, "subdevices_avail: %d\n", info->subdevices_avail); 375 kfree(info); 374 376 } 375 377 -
GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_native.c
r767 r771 252 252 err = -EFAULT; 253 253 } 254 kfree(info); 254 255 return err; 255 256 } … … 439 440 440 441 changed = r->func(params, r); 441 if (changed < 0) 442 return changed; 442 if (changed < 0) { 443 err = changed; 444 goto out; 445 } 443 446 444 447 /* … … 471 474 goto retry; 472 475 476 out: 477 kfree(rstamps); 473 478 return err; 474 479 } … … 591 596 err = snd_pcm_hw_refine(substream, params); 592 597 if (err < 0) 593 return err;598 goto end; 594 599 595 600 err = fixup_unreferenced_params(substream, params); 596 601 if (err < 0) 597 return err;602 goto end; 598 603 599 604 if (copy_to_user(_params, params, sizeof(*params))) 600 return -EFAULT; 601 return 0; 605 err = -EFAULT; 606 end: 607 kfree(params); 608 return err; 602 609 } 603 610 … … 884 891 err = snd_pcm_hw_params(substream, params); 885 892 if (err < 0) 886 return err;893 goto end; 887 894 888 895 if (copy_to_user(_params, params, sizeof(*params))) 889 return -EFAULT; 896 err = -EFAULT; 897 end: 898 kfree(params); 890 899 return err; 891 900 } … … 2322 2331 substream1 = pcm_file->substream; 2323 2332 2324 if (substream == substream1) 2325 return -EINVAL; 2333 if (substream == substream1) { 2334 res = -EINVAL; 2335 goto _badf; 2336 } 2326 2337 2327 2338 group = kzalloc(sizeof(*group), GFP_KERNEL); … … 3360 3371 else 3361 3372 result = snd_pcm_lib_readv(substream, bufs, xfern.frames); 3373 kfree(bufs); 3362 3374 if (put_user(result, &_xfern->result)) 3363 3375 return -EFAULT; … … 3656 3668 if (result > 0) 3657 3669 result = frames_to_bytes(runtime, result); 3670 kfree(bufs); 3658 3671 return result; 3659 3672 } … … 3694 3707 if (result > 0) 3695 3708 result = frames_to_bytes(runtime, result); 3709 kfree(bufs); 3696 3710 return result; 3697 3711 } … … 4149 4163 4150 4164 oparams = memdup_user(_oparams, sizeof(*oparams)); 4151 if (IS_ERR(oparams)) 4152 return PTR_ERR(oparams); 4165 if (IS_ERR(oparams)) { 4166 err = PTR_ERR(oparams); 4167 goto out; 4168 } 4153 4169 snd_pcm_hw_convert_from_old_params(params, oparams); 4154 4170 err = snd_pcm_hw_refine(substream, params); 4155 4171 if (err < 0) 4156 return err;4172 goto out_old; 4157 4173 4158 4174 err = fixup_unreferenced_params(substream, params); 4159 4175 if (err < 0) 4160 return err;4176 goto out_old; 4161 4177 4162 4178 snd_pcm_hw_convert_to_old_params(oparams, params); 4163 4179 if (copy_to_user(_oparams, oparams, sizeof(*oparams))) 4164 return -EFAULT; 4165 return 0; 4180 err = -EFAULT; 4181 out_old: 4182 kfree(oparams); 4183 out: 4184 kfree(params); 4185 return err; 4166 4186 } 4167 4187 … … 4178 4198 4179 4199 oparams = memdup_user(_oparams, sizeof(*oparams)); 4180 if (IS_ERR(oparams)) 4181 return PTR_ERR(oparams); 4200 if (IS_ERR(oparams)) { 4201 err = PTR_ERR(oparams); 4202 goto out; 4203 } 4182 4204 4183 4205 snd_pcm_hw_convert_from_old_params(params, oparams); 4184 4206 err = snd_pcm_hw_params(substream, params); 4185 4207 if (err < 0) 4186 return err;4208 goto out_old; 4187 4209 4188 4210 snd_pcm_hw_convert_to_old_params(oparams, params); 4189 4211 if (copy_to_user(_oparams, oparams, sizeof(*oparams))) 4190 return -EFAULT; 4191 return 0; 4212 err = -EFAULT; 4213 out_old: 4214 kfree(oparams); 4215 out: 4216 kfree(params); 4217 return err; 4192 4218 } 4193 4219 #endif /* CONFIG_SND_SUPPORT_OLD_API */ -
GPL/branches/uniaud32-exp/alsa-kernel/core/seq/oss/seq_oss_init.c
r766 r771 68 68 69 69 port = kzalloc(sizeof(*port), GFP_KERNEL); 70 if (!port) 71 return -ENOMEM; 70 if (!port) { 71 rc = -ENOMEM; 72 goto __error; 73 } 72 74 73 75 /* create ALSA client */ … … 75 77 "OSS sequencer"); 76 78 if (rc < 0) 77 return rc;79 goto __error; 78 80 79 81 system_client = rc; … … 103 105 call_ctl(SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, &subs); 104 106 } 107 rc = 0; 105 108 106 109 /* look up midi devices */ 107 110 schedule_work(&async_lookup_work); 108 111 109 return 0; 112 __error: 113 kfree(port); 114 return rc; 110 115 } 111 116 -
GPL/branches/uniaud32-exp/alsa-kernel/core/seq/oss/seq_oss_midi.c
r766 r771 70 70 clinfo = kzalloc(sizeof(*clinfo), GFP_KERNEL); 71 71 pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL); 72 if (!clinfo || !pinfo) 72 if (! clinfo || ! pinfo) { 73 kfree(clinfo); 74 kfree(pinfo); 73 75 return -ENOMEM; 76 } 74 77 clinfo->client = -1; 75 78 while (snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT, clinfo) == 0) { … … 81 84 snd_seq_oss_midi_check_new_port(pinfo); 82 85 } 86 kfree(clinfo); 87 kfree(pinfo); 83 88 return 0; 84 89 } -
GPL/branches/uniaud32-exp/alsa-kernel/core/seq/seq_midi.c
r767 r771 302 302 if (ports < input_count) 303 303 ports = input_count; 304 if (ports == 0) 304 if (ports == 0) { 305 kfree(info); 305 306 return -ENODEV; 307 } 306 308 if (ports > (256 / SNDRV_RAWMIDI_DEVICES)) 307 309 ports = 256 / SNDRV_RAWMIDI_DEVICES; -
GPL/branches/uniaud32-exp/alsa-kernel/core/timer.c
r767 r771 1725 1725 } else { 1726 1726 err = -ENODEV; 1727 1727 } 1728 1728 mutex_unlock(®ister_mutex); 1729 1729 if (err >= 0 && copy_to_user(_ginfo, ginfo, sizeof(*ginfo))) -
GPL/branches/uniaud32-exp/alsa-kernel/core/vmaster.c
r766 r771 66 66 err = follower->follower.get(&follower->follower, uctl); 67 67 if (err < 0) 68 return err;68 goto error; 69 69 for (ch = 0; ch < follower->info.count; ch++) 70 70 follower->vals[ch] = uctl->value.integer.value[ch]; 71 return 0; 71 error: 72 kfree(uctl); 73 return err < 0 ? err : 0; 72 74 } 73 75 … … 90 92 uinfo->id = follower->follower.id; 91 93 err = follower->follower.info(&follower->follower, uinfo); 92 if (err < 0) 93 return err; 94 if (err < 0) { 95 kfree(uinfo); 96 return err; 97 } 94 98 follower->info.type = uinfo->type; 95 99 follower->info.count = uinfo->count; … … 98 102 follower->info.type != SNDRV_CTL_ELEM_TYPE_BOOLEAN)) { 99 103 pr_err("ALSA: vmaster: invalid follower element\n"); 104 kfree(uinfo); 100 105 return -EINVAL; 101 106 } … … 103 108 follower->info.max_val = uinfo->value.integer.max; 104 109 110 kfree(uinfo); 105 111 return follower_update(follower); 106 112 } … … 359 365 follower_put_val(follower, uval); 360 366 } 367 kfree(uval); 361 368 return 0; 362 369 } -
GPL/branches/uniaud32-exp/uniaud.inc
r767 r771 13 13 # ex RC3 GA FIXPACK2 beta_47 14 14 # Comment out to avoid a fixpack line in bldlevel 15 FIXPACK = SVN r7 6415 FIXPACK = SVN r771
Note:
See TracChangeset
for help on using the changeset viewer.