[PATCH 1/2] ASoC: qdsp6: q6asm: fix cppcheck warnings for unnecessary initialization

Srinivas Kandagatla srinivas.kandagatla at linaro.org
Mon Aug 9 14:31:36 CEST 2021


cppcheck reports below warning.
q6asm.c:1631: (style) Variable 'port' is reassigned a value before the
old one has been used.

This is due to unnecessary initialization of variable port, which is
now removed as part of this patch.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
---
 sound/soc/qcom/qdsp6/q6asm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
index 36bf8bd4edd7..9251d8548965 100644
--- a/sound/soc/qcom/qdsp6/q6asm.c
+++ b/sound/soc/qcom/qdsp6/q6asm.c
@@ -1624,7 +1624,7 @@ EXPORT_SYMBOL_GPL(q6asm_write_async);
 
 static void q6asm_reset_buf_state(struct audio_client *ac)
 {
-	struct audio_port_data *port = NULL;
+	struct audio_port_data *port;
 	unsigned long flags;
 
 	spin_lock_irqsave(&ac->lock, flags);
-- 
2.21.0



More information about the Alsa-devel mailing list