提交 57e33781 编写于 作者: S Sachin Kamat 提交者: 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: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册