From 2899d6fe90ce85f39a055ce7007e715110633edc Mon Sep 17 00:00:00 2001 From: "dharageswari.r" Date: Thu, 6 Oct 2011 16:18:38 +0100 Subject: [PATCH] intel_sst: error handling in alloc stream, when the firmware timeout happens This patch returns the SST_IPC_ERR_STREAM_ALLOC_FAILED error, incase of firmware timeout, for the alloc stream IPC message from audio driver. Change-Id: I1dc77246f3e31faef89ea7f73a1472b6da1b270c Signed-off-by: dharageswari.r --- drivers/staging/intel_sst/intel_sst_drv_interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/drivers/staging/intel_sst/intel_sst_drv_interface.c index 1a7c4bd..9ffe491 100644 --- a/drivers/staging/intel_sst/intel_sst_drv_interface.c +++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c @@ -205,6 +205,8 @@ int sst_get_stream_allocated(struct snd_sst_params *str_param, pr_debug("Stream allocated %d\n", retval); str_id = retval; str_info = &sst_drv_ctx->streams[str_id]; + if (str_id == 0) + str_id = -SST_IPC_ERR_STREAM_ALLOC_FAILED; /* Block the call for reply */ retval = sst_wait_interruptible_timeout(sst_drv_ctx, &str_info->ctrl_blk, SST_BLOCK_TIMEOUT); -- 2.7.4