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/synth/emux/soundfont.c

    r679 r703  
    109109 * although it was designed for the AWE64.
    110110 *
    111  * The sample_write and callargs pararameters allow a callback into
     111 * The sample_write and callargs parameters allow a callback into
    112112 * the actual driver to write sample data to the board or whatever
    113113 * it wants to do with it.
     
    350350        struct snd_sf_zone *zp;
    351351
    352         if ((zp = kzalloc(sizeof(*zp), GFP_KERNEL)) == NULL)
     352        zp = kzalloc(sizeof(*zp), GFP_KERNEL);
     353        if (!zp)
    353354                return NULL;
    354355        zp->next = sf->zones;
     
    382383        struct snd_sf_sample *sp;
    383384
    384         if ((sp = kzalloc(sizeof(*sp), GFP_KERNEL)) == NULL)
     385        sp = kzalloc(sizeof(*sp), GFP_KERNEL);
     386        if (!sp)
    385387                return NULL;
    386388
     
    452454
    453455        /* create a new zone */
    454         if ((zp = sf_zone_new(sflist, sf)) == NULL)
     456        zp = sf_zone_new(sflist, sf);
     457        if (!zp)
    455458                return -ENOMEM;
    456459
     
    515518
    516519        /* patch must be opened */
    517         if ((sf = sflist->currsf) == NULL)
     520        sf = sflist->currsf;
     521        if (!sf)
    518522                return -EINVAL;
    519523
     
    582586
    583587                /* create a new zone */
    584                 if ((zone = sf_zone_new(sflist, sf)) == NULL) {
     588                zone = sf_zone_new(sflist, sf);
     589                if (!zone)
    585590                        return -ENOMEM;
    586                 }
    587591
    588592                /* copy the temporary data */
     
    703707
    704708        /* patch must be opened */
    705         if ((sf = sflist->currsf) == NULL)
     709        sf = sflist->currsf;
     710        if (!sf)
    706711                return -EINVAL;
    707712
     
    726731
    727732        /* Allocate a new sample structure */
    728         if ((sp = sf_sample_new(sflist, sf)) == NULL)
     733        sp = sf_sample_new(sflist, sf);
     734        if (!sp)
    729735                return -ENOMEM;
    730736
     
    796802        s = (amount >> 24) & 0x7f;
    797803        low = (amount >> 16) & 0xff;
    798         /* linear approxmimation by lower 8 bit */
     804        /* linear approximation by lower 8 bit */
    799805        v = (log_tbl[s + 1] * low + log_tbl[s] * (0x100 - low)) >> 8;
    800806        v -= offset;
     
    961967        if (sf == NULL)
    962968                return -ENOMEM;
    963         if ((smp = sf_sample_new(sflist, sf)) == NULL)
     969        smp = sf_sample_new(sflist, sf);
     970        if (!smp)
    964971                return -ENOMEM;
    965972        sample_id = sflist->sample_counter;
     
    9991006
    10001007        /* set up voice info */
    1001         if ((zone = sf_zone_new(sflist, sf)) == NULL) {
     1008        zone = sf_zone_new(sflist, sf);
     1009        if (!zone) {
    10021010                sf_sample_delete(sflist, sf, smp);
    10031011                return -ENOMEM;
     
    11841192
    11851193        /* prepend this zone */
    1186         if ((index = get_index(cur->bank, cur->instr, cur->v.low)) < 0)
     1194        index = get_index(cur->bank, cur->instr, cur->v.low);
     1195        if (index < 0)
    11871196                return;
    11881197        cur->next_zone = zone; /* zone link */
     
    12001209        struct snd_sf_zone *p;
    12011210
    1202         if ((index = get_index(zp->bank, zp->instr, zp->v.low)) < 0)
     1211        index = get_index(zp->bank, zp->instr, zp->v.low);
     1212        if (index < 0)
    12031213                return;
    12041214        for (p = sflist->presets[index]; p; p = p->next_instr) {
     
    12601270        struct snd_sf_zone *zp;
    12611271
    1262         if ((index = get_index(bank, preset, key)) < 0)
     1272        index = get_index(bank, preset, key);
     1273        if (index < 0)
    12631274                return NULL;
    12641275        for (zp = sflist->presets[index]; zp; zp = zp->next_instr) {
     
    13891400        struct snd_sf_list *sflist;
    13901401
    1391         if ((sflist = kzalloc(sizeof(*sflist), GFP_KERNEL)) == NULL)
     1402        sflist = kzalloc(sizeof(*sflist), GFP_KERNEL);
     1403        if (!sflist)
    13921404                return NULL;
    13931405
     
    14241436/*
    14251437 * Remove all samples
    1426  * The soundcard should be silet before calling this function.
     1438 * The soundcard should be silent before calling this function.
    14271439 */
    14281440int
Note: See TracChangeset for help on using the changeset viewer.