Commit 57e33781 authored by Sachin Kamat's avatar Sachin Kamat Committed by Mark Brown

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 9b35a7b6
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment