drivers/audio/audio_i2s.c: Fix bad NULL pointer check
This commit is contained in:
parent
09c907b446
commit
827d316dce
@ -231,11 +231,12 @@ static int audio_i2s_configure(FAR struct audio_lowerhalf_s *dev,
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
FAR struct audio_i2s_s *audio_i2s = (struct audio_i2s_s *)dev;
|
FAR struct audio_i2s_s *audio_i2s = (struct audio_i2s_s *)dev;
|
||||||
FAR struct i2s_dev_s *i2s = audio_i2s->i2s;
|
FAR struct i2s_dev_s *i2s;
|
||||||
int samprate, nchannels, bpsamp;
|
int samprate, nchannels, bpsamp;
|
||||||
int ret = OK;
|
int ret = OK;
|
||||||
|
|
||||||
DEBUGASSERT(audio_i2s && caps);
|
DEBUGASSERT(audio_i2s != NULL && caps != NULL);
|
||||||
|
i2s = audio_i2s->i2s;
|
||||||
audinfo("ac_type: %d\n", caps->ac_type);
|
audinfo("ac_type: %d\n", caps->ac_type);
|
||||||
|
|
||||||
/* Process the configure operation */
|
/* Process the configure operation */
|
||||||
|
Loading…
Reference in New Issue
Block a user