Commit ca19d1a6 authored by Dave Airlie's avatar Dave Airlie Committed by Alex Deucher

amdgpu/dc: make timing generator constructor return void.

This can't fail as is.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 395f669e
...@@ -375,13 +375,8 @@ static struct timing_generator *dce100_timing_generator_create( ...@@ -375,13 +375,8 @@ static struct timing_generator *dce100_timing_generator_create(
if (!tg110) if (!tg110)
return NULL; return NULL;
if (dce110_timing_generator_construct(tg110, ctx, instance, dce110_timing_generator_construct(tg110, ctx, instance, offsets);
offsets))
return &tg110->base; return &tg110->base;
BREAK_TO_DEBUGGER();
kfree(tg110);
return NULL;
} }
static struct stream_encoder *dce100_stream_encoder_create( static struct stream_encoder *dce100_stream_encoder_create(
......
...@@ -410,12 +410,8 @@ static struct timing_generator *dce110_timing_generator_create( ...@@ -410,12 +410,8 @@ static struct timing_generator *dce110_timing_generator_create(
if (!tg110) if (!tg110)
return NULL; return NULL;
if (dce110_timing_generator_construct(tg110, ctx, instance, offsets)) dce110_timing_generator_construct(tg110, ctx, instance, offsets);
return &tg110->base; return &tg110->base;
BREAK_TO_DEBUGGER();
kfree(tg110);
return NULL;
} }
static struct stream_encoder *dce110_stream_encoder_create( static struct stream_encoder *dce110_stream_encoder_create(
......
...@@ -1941,15 +1941,12 @@ static const struct timing_generator_funcs dce110_tg_funcs = { ...@@ -1941,15 +1941,12 @@ static const struct timing_generator_funcs dce110_tg_funcs = {
.arm_vert_intr = dce110_arm_vert_intr, .arm_vert_intr = dce110_arm_vert_intr,
}; };
bool dce110_timing_generator_construct( void dce110_timing_generator_construct(
struct dce110_timing_generator *tg110, struct dce110_timing_generator *tg110,
struct dc_context *ctx, struct dc_context *ctx,
uint32_t instance, uint32_t instance,
const struct dce110_timing_generator_offsets *offsets) const struct dce110_timing_generator_offsets *offsets)
{ {
if (!tg110)
return false;
tg110->controller_id = CONTROLLER_ID_D0 + instance; tg110->controller_id = CONTROLLER_ID_D0 + instance;
tg110->base.inst = instance; tg110->base.inst = instance;
...@@ -1966,6 +1963,4 @@ bool dce110_timing_generator_construct( ...@@ -1966,6 +1963,4 @@ bool dce110_timing_generator_construct(
tg110->min_h_blank = 56; tg110->min_h_blank = 56;
tg110->min_h_front_porch = 4; tg110->min_h_front_porch = 4;
tg110->min_h_back_porch = 4; tg110->min_h_back_porch = 4;
return true;
} }
...@@ -118,7 +118,7 @@ struct dce110_timing_generator { ...@@ -118,7 +118,7 @@ struct dce110_timing_generator {
#define DCE110TG_FROM_TG(tg)\ #define DCE110TG_FROM_TG(tg)\
container_of(tg, struct dce110_timing_generator, base) container_of(tg, struct dce110_timing_generator, base)
bool dce110_timing_generator_construct( void dce110_timing_generator_construct(
struct dce110_timing_generator *tg, struct dce110_timing_generator *tg,
struct dc_context *ctx, struct dc_context *ctx,
uint32_t instance, uint32_t instance,
......
...@@ -415,12 +415,8 @@ static struct timing_generator *dce112_timing_generator_create( ...@@ -415,12 +415,8 @@ static struct timing_generator *dce112_timing_generator_create(
if (!tg110) if (!tg110)
return NULL; return NULL;
if (dce110_timing_generator_construct(tg110, ctx, instance, offsets)) dce110_timing_generator_construct(tg110, ctx, instance, offsets);
return &tg110->base; return &tg110->base;
BREAK_TO_DEBUGGER();
kfree(tg110);
return NULL;
} }
static struct stream_encoder *dce112_stream_encoder_create( static struct stream_encoder *dce112_stream_encoder_create(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment