Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f368d3bf authored by Ernst Sjöstrand's avatar Ernst Sjöstrand Committed by Alex Deucher
Browse files

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



Reported by smatch:
bw_calcs() error: potential null dereference 'data'

Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarErnst Sjöstrand <ernstp@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d83e87b2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2794,6 +2794,8 @@ bool bw_calcs(struct dc_context *ctx,
{
	struct bw_calcs_data *data = kzalloc(sizeof(struct bw_calcs_data),
					     GFP_KERNEL);
	if (!data)
		return false;

	populate_initial_data(pipe, pipe_count, data);