audio: Don't register audio device if name isn't given in audio_comp_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
f3d20abe07
commit
1a6ee1b908
@ -969,10 +969,13 @@ FAR struct audio_lowerhalf_s *audio_comp_initialize(FAR const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
ret = audio_register(name, &priv->export);
|
if (name != NULL)
|
||||||
if (ret < 0)
|
|
||||||
{
|
{
|
||||||
goto free_lower;
|
ret = audio_register(name, &priv->export);
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
goto free_lower;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return &priv->export;
|
return &priv->export;
|
||||||
|
Loading…
Reference in New Issue
Block a user