mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	topology: coverity - remove dead code
This commit is contained in:
		
							parent
							
								
									b96f6f4785
								
							
						
					
					
						commit
						db0e1dcfc2
					
				
					 3 changed files with 10 additions and 14 deletions
				
			
		| 
						 | 
					@ -173,7 +173,7 @@ static int tplg_build_enum_control(snd_tplg_t *tplg,
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct tplg_ref *ref;
 | 
						struct tplg_ref *ref;
 | 
				
			||||||
	struct list_head *base, *pos;
 | 
						struct list_head *base, *pos;
 | 
				
			||||||
	int err = 0;
 | 
						int err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	base = &elem->ref_list;
 | 
						base = &elem->ref_list;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -198,8 +198,7 @@ static int tplg_build_enum_control(snd_tplg_t *tplg,
 | 
				
			||||||
			SNDERR("error: cannot find '%s' referenced by"
 | 
								SNDERR("error: cannot find '%s' referenced by"
 | 
				
			||||||
				" control '%s'\n", ref->id, elem->id);
 | 
									" control '%s'\n", ref->id, elem->id);
 | 
				
			||||||
			return -EINVAL;
 | 
								return -EINVAL;
 | 
				
			||||||
		} else if (err < 0)
 | 
							}
 | 
				
			||||||
			return err;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -917,7 +917,7 @@ int tplg_build_manifest_data(snd_tplg_t *tplg)
 | 
				
			||||||
	list_for_each(pos, base) {
 | 
						list_for_each(pos, base) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ref = list_entry(pos, struct tplg_ref, list);
 | 
							ref = list_entry(pos, struct tplg_ref, list);
 | 
				
			||||||
		if (ref->id == NULL || ref->elem)
 | 
							if (ref->elem)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (ref->type == SND_TPLG_TYPE_DATA) {
 | 
							if (ref->type == SND_TPLG_TYPE_DATA) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -96,8 +96,7 @@ static int build_pcm(snd_tplg_t *tplg, struct tplg_elem *elem)
 | 
				
			||||||
			SNDERR("error: cannot find '%s' referenced by"
 | 
								SNDERR("error: cannot find '%s' referenced by"
 | 
				
			||||||
				" PCM '%s'\n", ref->id, elem->id);
 | 
									" PCM '%s'\n", ref->id, elem->id);
 | 
				
			||||||
			return -EINVAL;
 | 
								return -EINVAL;
 | 
				
			||||||
		} else if (err < 0)
 | 
							}
 | 
				
			||||||
			return err;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
| 
						 | 
					@ -1208,10 +1207,8 @@ int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* ID and names */
 | 
						/* ID and names */
 | 
				
			||||||
	link->id = link_tpl->id;
 | 
						link->id = link_tpl->id;
 | 
				
			||||||
	if (link->name)
 | 
					 | 
				
			||||||
	elem_copy_text(link->name, link_tpl->name,
 | 
						elem_copy_text(link->name, link_tpl->name,
 | 
				
			||||||
		       SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
 | 
							       SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
 | 
				
			||||||
	if (link->stream_name)
 | 
					 | 
				
			||||||
	elem_copy_text(link->stream_name, link_tpl->stream_name,
 | 
						elem_copy_text(link->stream_name, link_tpl->stream_name,
 | 
				
			||||||
		       SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
 | 
							       SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue