From 7a3f2bf7abbadc2966ea7d498a760e514fa04621 Mon Sep 17 00:00:00 2001 From: danguanghua Date: Thu, 17 Dec 2020 18:20:34 +0800 Subject: [PATCH] audio: uninitialize usermq to NULL when the device has not N/A be opened anymore. There is no need to update usermq to NULL in audio_open. Change-Id: I0c20bfa40a4fcd5c8cae0cf09bb55e113435ea62 Signed-off-by: danguanghua --- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 869eab05c7..05fbcb93af 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -187,7 +187,6 @@ static int audio_open(FAR struct file *filep) /* Save the new open count on success */ upper->crefs = tmp; - upper->usermq = NULL; ret = OK; errout_with_sem: @@ -244,6 +243,7 @@ static int audio_close(FAR struct file *filep) audinfo("calling shutdown\n"); lower->ops->shutdown(lower); + upper->usermq = NULL; } ret = OK;