[Sound-open-firmware] [PATCH] host: fix an uninitialized warning issue

Keyon Jie yang.jie at linux.intel.com
Tue Feb 14 10:41:46 CET 2017


We met a variable uninitialized issue:
'ret' might be used uninitialized in this function.
host.c:606 | host_preload()

Here adding the initialized assignment to fix this issue.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
 src/audio/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio/host.c b/src/audio/host.c
index d1e4eaf..069c6a2 100644
--- a/src/audio/host.c
+++ b/src/audio/host.c
@@ -583,7 +583,7 @@ static int host_params(struct comp_dev *dev, struct stream_params *params)
 static int host_preload(struct comp_dev *dev)
 {
 	struct host_data *hd = comp_get_drvdata(dev);
-	int ret, i;
+	int ret = 0, i;
 
 	trace_host("PrL");
 
-- 
2.7.4



More information about the Sound-open-firmware mailing list