ASoC: sn95031: sst_platform: intel_sst: fix errors reported by klocwork
authorAbhay <abhay.joshi@intel.com>
Thu, 6 Oct 2011 15:18:29 +0000 (16:18 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 21:16:42 +0000 (13:16 -0800)
commite38f7bcdbf4d26a1b9502a08eacdff6d17fa9895
tree009225dc3e671f44002c7a872b588acaddf5e70f
parentfe5438a8be74639023bd4b05927b40917cc55e52
ASoC: sn95031: sst_platform: intel_sst: fix errors reported by klocwork

Variables in audio driver code need to be freed properly to avoid possible memory leaks.
Also the unchecked return of variables from called functions may cause out of bound errors
like in case of array indexes.

This patch fixes these errors (as pointed by the klocwork )in sst driver and ASoC code by
freeing the memory of unused variables and checking on the returned value by called function
to array index to avoid posible array out of bound runtime error.

Change-Id: I1710889976e0d257ba2e7bede338cc2f056ae095
Signed-off-by: Abhay <abhay.joshi@intel.com>
drivers/staging/intel_sst/intel_sst_app_interface.c
drivers/staging/intel_sst/intel_sst_drv_interface.c
sound/soc/codecs/sn95031.c
sound/soc/mid-x86/sst_platform.c