sim/alsa: add ptr check in _stop
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
This commit is contained in:
parent
09afb4d7d0
commit
eba292f4b9
|
@ -560,11 +560,17 @@ static int sim_audio_stop(struct audio_lowerhalf_s *dev)
|
||||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
apb_free(priv->aux);
|
if (priv->aux)
|
||||||
priv->aux = NULL;
|
{
|
||||||
|
apb_free(priv->aux);
|
||||||
|
priv->aux = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
priv->ops->uninit(priv->codec);
|
if (priv->ops)
|
||||||
priv->ops = NULL;
|
{
|
||||||
|
priv->ops->uninit(priv->codec);
|
||||||
|
priv->ops = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue