summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/i2s.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2014-01-24 16:23:22 +0530
committerMark Brown <broonie@linaro.org>2014-01-24 13:18:03 +0000
commit57e33781ce5aaab86b4db7799f3505988b5226e2 (patch)
tree602bdf0e797248acbd1ccd0d03e794c872a3e277 /sound/soc/samsung/i2s.c
parent9b35a7b65f15ac8769619146ab12933ffa5dcaf8 (diff)
downloadop-kernel-dev-57e33781ce5aaab86b4db7799f3505988b5226e2.zip
op-kernel-dev-57e33781ce5aaab86b4db7799f3505988b5226e2.tar.gz
ASoC: samsung: Add NULL check in i2s.c
'res' could be NULL from one of the operations above (line 1243). Thus check 'res' for NULL before releasing the region to avoid null pointer dereference. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/samsung/i2s.c')
-rw-r--r--sound/soc/samsung/i2s.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 92f64363..a9da24f 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1268,7 +1268,8 @@ static int samsung_i2s_probe(struct platform_device *pdev)
return 0;
err:
- release_mem_region(regs_base, resource_size(res));
+ if (res)
+ release_mem_region(regs_base, resource_size(res));
return ret;
}
OpenPOWER on IntegriCloud