mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: remove extra NULL checks in snd_pcm_dshare_open()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									01a45aec6f
								
							
						
					
					
						commit
						74c6382df6
					
				
					 1 changed files with 5 additions and 8 deletions
				
			
		| 
						 | 
					@ -690,8 +690,8 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
			snd_config_t *root, snd_config_t *sconf,
 | 
								snd_config_t *root, snd_config_t *sconf,
 | 
				
			||||||
			snd_pcm_stream_t stream, int mode)
 | 
								snd_pcm_stream_t stream, int mode)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	snd_pcm_t *pcm = NULL, *spcm = NULL;
 | 
						snd_pcm_t *pcm, *spcm = NULL;
 | 
				
			||||||
	snd_pcm_direct_t *dshare = NULL;
 | 
						snd_pcm_direct_t *dshare;
 | 
				
			||||||
	int ret, first_instance;
 | 
						int ret, first_instance;
 | 
				
			||||||
	unsigned int chn;
 | 
						unsigned int chn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -851,11 +851,8 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
 | 
				
			||||||
	} else
 | 
						} else
 | 
				
			||||||
		snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT);
 | 
							snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT);
 | 
				
			||||||
 _err_nosem:
 | 
					 _err_nosem:
 | 
				
			||||||
	if (dshare) {
 | 
					 | 
				
			||||||
	free(dshare->bindings);
 | 
						free(dshare->bindings);
 | 
				
			||||||
	free(dshare);
 | 
						free(dshare);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if (pcm)
 | 
					 | 
				
			||||||
	snd_pcm_free(pcm);
 | 
						snd_pcm_free(pcm);
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue