diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-01-24 16:23:22 +0530 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-11-27 06:03:55 -0800 |
commit | d5a3ff12ee04d1a7c2ad243bf64b74e59265e010 (patch) | |
tree | e6e2fc93e3779e9bc0cc2bb6d515c7563e1fe27c /sound | |
parent | f146ac43b1dcaf9a1ec3bb36aa4a9a572a3af3ed (diff) | |
download | linux-3.10-d5a3ff12ee04d1a7c2ad243bf64b74e59265e010.tar.gz linux-3.10-d5a3ff12ee04d1a7c2ad243bf64b74e59265e010.tar.bz2 linux-3.10-d5a3ff12ee04d1a7c2ad243bf64b74e59265e010.zip |
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.
Change-Id: Iade84bccdfb1858c55ccf4cc5ef5ece3d51d9e00
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index bce311d9d9c..3cfda177f06 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1337,7 +1337,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; } |