mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-02 01:40:08 -05:00
add missing return value changes for snd_config_get_id() calls
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
This commit is contained in:
parent
41039b49ad
commit
796b48c0d2
7 changed files with 18 additions and 9 deletions
|
|
@ -98,7 +98,8 @@ int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
return -EINVAL;
|
||||
|
||||
channel += tplg->channel_idx;
|
||||
snd_config_get_id(cfg, &id);
|
||||
if (snd_config_get_id(cfg, &id) < 0)
|
||||
return -EINVAL;
|
||||
tplg_dbg("\tChannel %s at index %d", id, tplg->channel_idx);
|
||||
|
||||
channel_id = lookup_channel(id);
|
||||
|
|
|
|||
|
|
@ -381,7 +381,8 @@ int tplg_parse_dapm_graph(snd_tplg_t *tplg, snd_config_t *cfg,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
snd_config_get_id(cfg, &graph_id);
|
||||
if (snd_config_get_id(cfg, &graph_id) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
snd_config_for_each(i, next, cfg) {
|
||||
const char *id;
|
||||
|
|
|
|||
|
|
@ -792,7 +792,8 @@ static int parse_tuple_set(snd_config_t *cfg,
|
|||
unsigned int tuple_val;
|
||||
int type, ival;
|
||||
|
||||
snd_config_get_id(cfg, &id);
|
||||
if (snd_config_get_id(cfg, &id) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
type = get_tuple_type(id);
|
||||
if (type < 0) {
|
||||
|
|
|
|||
|
|
@ -423,7 +423,10 @@ struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg,
|
|||
|
||||
/* do we get name from cfg */
|
||||
if (cfg) {
|
||||
snd_config_get_id(cfg, &id);
|
||||
if (snd_config_get_id(cfg, &id) < 0) {
|
||||
free(elem);
|
||||
return NULL;
|
||||
}
|
||||
snd_strlcpy(elem->id, id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
||||
elem->id[SNDRV_CTL_ELEM_ID_NAME_MAXLEN - 1] = 0;
|
||||
/* as we insert new elem based on the index value, move index
|
||||
|
|
|
|||
|
|
@ -627,7 +627,8 @@ static int tplg_parse_streams(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|||
const char *id, *value;
|
||||
int stream;
|
||||
|
||||
snd_config_get_id(cfg, &id);
|
||||
if (snd_config_get_id(cfg, &id) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
tplg_dbg("\t%s:", id);
|
||||
|
||||
|
|
@ -750,7 +751,8 @@ static int tplg_parse_fe_dai(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
|
|||
const char *id;
|
||||
unsigned int dai_id;
|
||||
|
||||
snd_config_get_id(cfg, &id);
|
||||
if (snd_config_get_id(cfg, &id) < 0)
|
||||
return -EINVAL;
|
||||
tplg_dbg("\t\tFE DAI %s:", id);
|
||||
snd_strlcpy(pcm->dai_name, id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue