snd_config_t *root, snd_config_t *sconf,
snd_pcm_stream_t stream, int mode)
{
- snd_pcm_t *pcm = NULL, *spcm = NULL;
- snd_pcm_direct_t *dshare = NULL;
+ snd_pcm_t *pcm, *spcm = NULL;
+ snd_pcm_direct_t *dshare;
int ret, first_instance;
unsigned int chn;
} else
snd_pcm_direct_semaphore_up(dshare, DIRECT_IPC_SEM_CLIENT);
_err_nosem:
- if (dshare) {
- free(dshare->bindings);
- free(dshare);
- }
- if (pcm)
- snd_pcm_free(pcm);
+ free(dshare->bindings);
+ free(dshare);
+ snd_pcm_free(pcm);
return ret;
}