From: Lu Guanqun Date: Tue, 6 Sep 2011 07:21:43 +0000 (+0800) Subject: ASoC: sst_platform: fix memory leak X-Git-Tag: v3.2-rc1~127^2~2^2~1^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=283e42e0114aba331b0055839f6277a4a7cfbc64;p=pandora-kernel.git ASoC: sst_platform: fix memory leak snd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is not opened successfully. However the corresponding close callback isn't able to be called later on to release these two allocated memories, thus resulting in memory leak. This patch moves the check for hardware contraints earlier, thus resolving this issue. Signed-off-by: Lu Guanqun Acked-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- Reading git-diff-tree failed