diff options
author | Ernst Sjöstrand <ernstp@gmail.com> | 2017-11-08 16:47:06 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-08 17:30:11 -0500 |
commit | f368d3bfde225199eef2216b03e0ba4944a3434a (patch) | |
tree | d4aeae53b3ec20afe0c996d2a7d03a6f5c5a4df8 | |
parent | d83e87b239ec42eeda34850da342b3d8f104812b (diff) |
amd/display: Fix potential null dereference in dce_calcs.c
Reported by smatch:
bw_calcs() error: potential null dereference 'data'
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c index 4f8a95368ffc..6347712db834 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | |||
@@ -2794,6 +2794,8 @@ bool bw_calcs(struct dc_context *ctx, | |||
2794 | { | 2794 | { |
2795 | struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data), | 2795 | struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data), |
2796 | GFP_KERNEL); | 2796 | GFP_KERNEL); |
2797 | if (!data) | ||
2798 | return false; | ||
2797 | 2799 | ||
2798 | populate_initial_data(pipe, pipe_count, data); | 2800 | populate_initial_data(pipe, pipe_count, data); |
2799 | 2801 | ||