From 9ebcadf85e8da6630f35b62c904edacc7ab5843e Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 11 Apr 2014 16:27:57 +0530 Subject: ASoC: Tegra: fix unchecked return value Fix Coverity issue of unchecked error return value of a function Coverity id : 26068 Bug 1416640 Change-Id: I21b560985b1e36a98f5ce0c8b8a2566dc7a02e25 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/395192 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sumit Bhattacharya --- sound/soc/tegra/tegra30_avp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/tegra/tegra30_avp.c b/sound/soc/tegra/tegra30_avp.c index 6416a866ba04..c8c5771780ff 100644 --- a/sound/soc/tegra/tegra30_avp.c +++ b/sound/soc/tegra/tegra30_avp.c @@ -1004,8 +1004,12 @@ static int tegra30_avp_compr_set_params(int id, stream->source_buffer_size = (params->fragments * params->fragment_size); - tegra30_avp_mem_alloc(&avp_stream->source_buf, + ret = tegra30_avp_mem_alloc(&avp_stream->source_buf, stream->source_buffer_size); + if (ret < 0) { + dev_err(audio_avp->dev, "Failed to allocate source buf memory"); + return ret; + } stream->source_buffer_system = avp_stream->source_buf.virt_addr; stream->source_buffer_avp = avp_stream->source_buf.phys_addr; -- cgit v1.2.3