提交 f368d3bf 编写于 作者: E Ernst Sjöstrand 提交者: Alex Deucher

amd/display: Fix potential null dereference in dce_calcs.c

Reported by smatch:
bw_calcs() error: potential null dereference 'data'
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NErnst Sjöstrand <ernstp@gmail.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 d83e87b2
...@@ -2794,6 +2794,8 @@ bool bw_calcs(struct dc_context *ctx, ...@@ -2794,6 +2794,8 @@ bool bw_calcs(struct dc_context *ctx,
{ {
struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data), struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data),
GFP_KERNEL); GFP_KERNEL);
if (!data)
return false;
populate_initial_data(pipe, pipe_count, data); populate_initial_data(pipe, pipe_count, data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册