drm/amd/display: null check pp_smu clock table before using it
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Fri, 11 Oct 2019 18:58:02 +0000 (14:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Oct 2019 20:30:29 +0000 (16:30 -0400)
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c

index 0e712df87109d8237c5d5156621d97e708bc958b..b647e0320e4bf964c16dce9e0a22b1fde3f6762b 100644 (file)
@@ -656,7 +656,7 @@ void rn_clk_mgr_construct(
 
        clk_mgr->base.bw_params = &rn_bw_params;
 
-       if (pp_smu) {
+       if (pp_smu && pp_smu->rn_funcs.get_dpm_clock_table) {
                pp_smu->rn_funcs.get_dpm_clock_table(&pp_smu->rn_funcs.pp_smu, &clock_table);
                rn_clk_mgr_helper_populate_bw_params(clk_mgr->base.bw_params, &clock_table, &ctx->asic_id);
        }