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

Commit 366cf03e authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher
Browse files

drm/amd/powerplay: fix memory allocation failure check V2



Fix memory allocation failure check.

- V2: fix one more similar error

Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 67adb569
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ static int vega20_tables_init(struct smu_context *smu, struct smu_table *tables)
	               AMDGPU_GEM_DOMAIN_VRAM);

	smu_table->metrics_table = kzalloc(sizeof(SmuMetrics_t), GFP_KERNEL);
	if (smu_table->metrics_table)
	if (!smu_table->metrics_table)
		return -ENOMEM;
	smu_table->metrics_time = 0;

@@ -1502,7 +1502,7 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)

	od8_settings = kzalloc(sizeof(struct vega20_od8_settings), GFP_KERNEL);

	if (od8_settings)
	if (!od8_settings)
		return -ENOMEM;

	smu->od_settings = (void *)od8_settings;