Skip to contentSkip to conversation

drm/amd/display/dc/dce112/dce112_resource: Drop redundant null-pointer check in bw_calcs_data_update_from_pplib()

PATCH New Tuo Li 1 participant 1 message Aug 7, 2021

Subsystems (3)
lore
Share & tools
lore

Tuo Li

author
#0 lore raw

PATCH 1/1 drm/amd/display/dc/dce112/dce112_resource: Drop redundant null-pointer check in bw_calcs_data_update_from_pplib()

The variable dc->bw_vbios is guaranteed to be not NULL by its callers. Thus the null-pointer check can be dropped.

---
 drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +1 -1
index ee55cda854bf..3fc8e6b664f9 100644
@@ -1064,7 +1064,7 @@ static void bw_calcs_data_update_from_pplib(struct dc *dc)
 	struct dm_pp_clock_levels clks = {0};
 	int memory_type_multiplier = MEMORY_TYPE_MULTIPLIER_CZ;
 
-	if (dc->bw_vbios && dc->bw_vbios->memory_type == bw_def_hbm)
+	if (dc->bw_vbios->memory_type == bw_def_hbm)
 		memory_type_multiplier = MEMORY_TYPE_HBM;
 
 	/*do system clock  TODO PPLIB: after PPLIB implement,
Signature · 1 line
2.25.1