diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c index 2ce730de0dc31f3204d2de173b26cd0c9b7909c9..37aeddfb7431700ad15580df312b0f3842c5f3d2 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c @@ -914,7 +914,7 @@ bool dce110_link_encoder_validate_dp_output( return false; } -bool dce110_link_encoder_construct( +void dce110_link_encoder_construct( struct dce110_link_encoder *enc110, const struct encoder_init_data *init_data, const struct encoder_feature_support *enc_features, @@ -1013,8 +1013,6 @@ bool dce110_link_encoder_construct( bp_cap_info.DP_HBR3_EN; enc110->base.features.flags.bits.HDMI_6GB_EN = bp_cap_info.HDMI_6GB_EN; } - - return true; } bool dce110_link_encoder_validate_output_with_stream( diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h index 5960fb933f1faac72a218f4b77f071c700b87a12..be0a45bdc5e2f8f870dc41eb121894a588022e87 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h @@ -168,7 +168,7 @@ struct dce110_link_encoder { }; -bool dce110_link_encoder_construct( +void dce110_link_encoder_construct( struct dce110_link_encoder *enc110, const struct encoder_init_data *init_data, const struct encoder_feature_support *enc_features, diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c index 75961338a8e4262551b3093b9c09afb98a7cfbdf..0084645837ec6b1fdf2800b498cafa9bae4d93ca 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c @@ -528,20 +528,13 @@ struct link_encoder *dce100_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); + return &enc110->base; } struct output_pixel_processor *dce100_opp_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index 9faf2feabdf11af963a49dc2ad81357b27b21118..2c24f2b882fe69a913eaa9adc59cd14c36b750b8 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -567,20 +567,13 @@ static struct link_encoder *dce110_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); + return &enc110->base; } static struct output_pixel_processor *dce110_opp_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c index 0011dd704af0a42afc2f25d51bdc9e5f9b112b7f..7aac8fdb3030739f6bf68afe1c220e8946d95dd4 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c @@ -552,20 +552,13 @@ struct link_encoder *dce112_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); + return &enc110->base; } static struct input_pixel_processor *dce112_ipp_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c index a6319391349611f422f85491313659aed965ee24..7de99c454f4beca52f404a36ff6a49b27d5606ff 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c @@ -544,20 +544,14 @@ static struct link_encoder *dce120_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + return &enc110->base; } static struct input_pixel_processor *dce120_ipp_create( diff --git a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c index 0b309acab6b1dfbaf958549592337c86b8c5d319..3603ae93cd7200b343ea29427dad2659647bba83 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c @@ -567,20 +567,13 @@ struct link_encoder *dce80_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); + return &enc110->base; } struct clock_source *dce80_clock_source_create( diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c index 5d6dd7f30253014d1bbc998c684021c623e4c1fc..c2df57b5e92175cd3aa541e384ed15fbc24a6e3d 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c @@ -563,20 +563,14 @@ struct link_encoder *dcn10_link_encoder_create( if (!enc110) return NULL; - if (dce110_link_encoder_construct( - enc110, - enc_init_data, - &link_enc_feature, - &link_enc_regs[enc_init_data->transmitter], - &link_enc_aux_regs[enc_init_data->channel - 1], - &link_enc_hpd_regs[enc_init_data->hpd_source])) { - - return &enc110->base; - } + dce110_link_encoder_construct(enc110, + enc_init_data, + &link_enc_feature, + &link_enc_regs[enc_init_data->transmitter], + &link_enc_aux_regs[enc_init_data->channel - 1], + &link_enc_hpd_regs[enc_init_data->hpd_source]); - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + return &enc110->base; } struct clock_source *dcn10_clock_source_create(