diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c index 532c6e638943ec88149adc1cd3e467a00ebcf4fe..b2add58ef889476bde4e54b42f3499fb93021f07 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c @@ -1605,7 +1605,7 @@ static const struct stream_encoder_funcs dce110_str_enc_funcs = { }; -bool dce110_stream_encoder_construct( +void dce110_stream_encoder_construct( struct dce110_stream_encoder *enc110, struct dc_context *ctx, struct dc_bios *bp, @@ -1614,11 +1614,6 @@ bool dce110_stream_encoder_construct( const struct dce_stream_encoder_shift *se_shift, const struct dce_stream_encoder_mask *se_mask) { - if (!enc110) - return false; - if (!bp) - return false; - enc110->base.funcs = &dce110_str_enc_funcs; enc110->base.ctx = ctx; enc110->base.id = eng_id; @@ -1626,6 +1621,4 @@ bool dce110_stream_encoder_construct( enc110->regs = regs; enc110->se_shift = se_shift; enc110->se_mask = se_mask; - - return true; } diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h index ff8ca124665024979e25e6d552150acf2411dde7..6c28229c76ebe32ef1a76b2a2f9a76866a1b8472 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h @@ -697,7 +697,7 @@ struct dce110_stream_encoder { const struct dce_stream_encoder_mask *se_mask; }; -bool dce110_stream_encoder_construct( +void dce110_stream_encoder_construct( struct dce110_stream_encoder *enc110, struct dc_context *ctx, struct dc_bios *bp, 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 6765162a0d78ef48741cbac88d7e00e827e21143..75961338a8e4262551b3093b9c09afb98a7cfbdf 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c @@ -389,14 +389,9 @@ static struct stream_encoder *dce100_stream_encoder_create( if (!enc110) return NULL; - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], &se_shift, &se_mask); + return &enc110->base; } #define SRII(reg_name, block, id)\ 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 3d91f2a49d1df1924de2cec18a07a61b98b9723f..9faf2feabdf11af963a49dc2ad81357b27b21118 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -424,14 +424,10 @@ static struct stream_encoder *dce110_stream_encoder_create( if (!enc110) return NULL; - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], + &se_shift, &se_mask); + return &enc110->base; } #define SRII(reg_name, block, id)\ 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 a06a68521c590d21720637e34998e47bfd616c37..0011dd704af0a42afc2f25d51bdc9e5f9b112b7f 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c @@ -428,15 +428,11 @@ static struct stream_encoder *dce112_stream_encoder_create( if (!enc110) return NULL; - - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], + &se_shift, &se_mask); + return &enc110->base; } #define SRII(reg_name, block, id)\ 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 a6f93a42c2ecf308001494b86b755ba6b679d553..a6319391349611f422f85491313659aed965ee24 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c @@ -585,14 +585,10 @@ static struct stream_encoder *dce120_stream_encoder_create( if (!enc110) return NULL; - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], + &se_shift, &se_mask); + return &enc110->base; } #define SRII(reg_name, block, id)\ 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 170509a4a221b1c6fccac7262bb7ab3d8056e6d1..0b309acab6b1dfbaf958549592337c86b8c5d319 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c @@ -441,14 +441,10 @@ static struct stream_encoder *dce80_stream_encoder_create( if (!enc110) return NULL; - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], + &se_shift, &se_mask); + return &enc110->base; } #define SRII(reg_name, block, id)\ 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 e21ba8c2f8d47a66bbe854ac20e5dffefee47df4..5d6dd7f30253014d1bbc998c684021c623e4c1fc 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c @@ -627,14 +627,10 @@ static struct stream_encoder *dcn10_stream_encoder_create( if (!enc110) return NULL; - if (dce110_stream_encoder_construct( - enc110, ctx, ctx->dc_bios, eng_id, - &stream_enc_regs[eng_id], &se_shift, &se_mask)) - return &enc110->base; - - BREAK_TO_DEBUGGER(); - kfree(enc110); - return NULL; + dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id, + &stream_enc_regs[eng_id], + &se_shift, &se_mask); + return &enc110->base; } static const struct dce_hwseq_registers hwseq_reg = {