Commit f94a9711 authored by Alex Hung's avatar Alex Hung Committed by Alex Deucher
Browse files

drm/amd/display: Remove redundant checks for ctx->dc_bios



The null checks for ctx->dc_bios are redundant as it was already
dereferenced previously, as reported by Coverity; therefore the
null checks are removed.

This fixes 7 REVERSE_INULL issues reported by Coverity.

Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1a664dc0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -772,7 +772,7 @@ void rn_clk_mgr_construct(
		status = pp_smu->rn_funcs.get_dpm_clock_table(&pp_smu->rn_funcs.pp_smu, &clock_table);

		if (status == PP_SMU_RESULT_OK &&
		    ctx->dc_bios && ctx->dc_bios->integrated_info) {
		    ctx->dc_bios->integrated_info) {
			rn_clk_mgr_helper_populate_bw_params (clk_mgr->base.bw_params, &clock_table, ctx->dc_bios->integrated_info);
			/* treat memory config as single channel if memory is asymmetrics. */
			if (ctx->dc->config.is_asymmetric_memory)
+1 −1
Original line number Diff line number Diff line
@@ -731,7 +731,7 @@ void vg_clk_mgr_construct(
	clk_mgr->base.base.bw_params = &vg_bw_params;

	vg_get_dpm_table_from_smu(&clk_mgr->base, &smu_dpm_clks);
	if (ctx->dc_bios && ctx->dc_bios->integrated_info) {
	if (ctx->dc_bios->integrated_info) {
		vg_clk_mgr_helper_populate_bw_params(
				&clk_mgr->base,
				ctx->dc_bios->integrated_info,
+1 −1
Original line number Diff line number Diff line
@@ -785,7 +785,7 @@ void dcn31_clk_mgr_construct(
					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].MemClk,
					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].Voltage);
		}
		if (ctx->dc_bios && ctx->dc_bios->integrated_info) {
		if (ctx->dc_bios->integrated_info) {
			dcn31_clk_mgr_helper_populate_bw_params(
					&clk_mgr->base,
					ctx->dc_bios->integrated_info,
+1 −1
Original line number Diff line number Diff line
@@ -896,7 +896,7 @@ void dcn314_clk_mgr_construct(
					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].Voltage);
		}

		if (ctx->dc_bios && ctx->dc_bios->integrated_info && ctx->dc->config.use_default_clock_table == false) {
		if (ctx->dc_bios->integrated_info && ctx->dc->config.use_default_clock_table == false) {
			dcn314_clk_mgr_helper_populate_bw_params(
					&clk_mgr->base,
					ctx->dc_bios->integrated_info,
+1 −1
Original line number Diff line number Diff line
@@ -712,7 +712,7 @@ void dcn315_clk_mgr_construct(
					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].Voltage);
		}

		if (ctx->dc_bios && ctx->dc_bios->integrated_info) {
		if (ctx->dc_bios->integrated_info) {
			dcn315_clk_mgr_helper_populate_bw_params(
					&clk_mgr->base,
					ctx->dc_bios->integrated_info,
Loading