This can't fail as is.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance,
- offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce100_stream_encoder_create(
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance, offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce110_stream_encoder_create(
.arm_vert_intr = dce110_arm_vert_intr,
};
-bool dce110_timing_generator_construct(
+void dce110_timing_generator_construct(
struct dce110_timing_generator *tg110,
struct dc_context *ctx,
uint32_t instance,
const struct dce110_timing_generator_offsets *offsets)
{
- if (!tg110)
- return false;
-
tg110->controller_id = CONTROLLER_ID_D0 + instance;
tg110->base.inst = instance;
tg110->min_h_blank = 56;
tg110->min_h_front_porch = 4;
tg110->min_h_back_porch = 4;
-
- return true;
}
#define DCE110TG_FROM_TG(tg)\
container_of(tg, struct dce110_timing_generator, base)
-bool dce110_timing_generator_construct(
+void dce110_timing_generator_construct(
struct dce110_timing_generator *tg,
struct dc_context *ctx,
uint32_t instance,
if (!tg110)
return NULL;
- if (dce110_timing_generator_construct(tg110, ctx, instance, offsets))
- return &tg110->base;
-
- BREAK_TO_DEBUGGER();
- kfree(tg110);
- return NULL;
+ dce110_timing_generator_construct(tg110, ctx, instance, offsets);
+ return &tg110->base;
}
static struct stream_encoder *dce112_stream_encoder_create(