diff options
author | Dave Airlie <airlied@redhat.com> | 2017-09-29 15:44:54 +1000 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-29 13:02:21 -0400 |
commit | b08c3ca4e90d03b3a120f4e60dba4b2b5e087433 (patch) | |
tree | a9ccc554e707c30a2e6ccaa6073d0d1b761bca89 /drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c | |
parent | 4179cd81376112d627216580b09b803eb25e1635 (diff) |
amdgpu/dc: remove pointless returns in the i2caux constructor paths. (v2)
There was lots of return true, and error checking that was never used
in these paths.
Just remove it all.
v2: I missed one return true.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c b/drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c index d3c157e5eccd..ed48596dd2a5 100644 --- a/drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c +++ b/drivers/gpu/drm/amd/display/dc/i2caux/dce80/i2caux_dce80.c @@ -187,7 +187,7 @@ static const struct i2caux_funcs i2caux_funcs = { .acquire_aux_engine = dal_i2caux_acquire_aux_engine, }; -static bool construct( +static void construct( struct i2caux_dce80 *i2caux_dce80, struct dc_context *ctx) { @@ -207,10 +207,7 @@ static bool construct( uint32_t i; - if (!dal_i2caux_construct(base, ctx)) { - BREAK_TO_DEBUGGER(); - return false; - } + dal_i2caux_construct(base, ctx); i2caux_dce80->base.funcs = &i2caux_funcs; i2caux_dce80->i2c_hw_buffer_in_use = false; @@ -269,8 +266,6 @@ static bool construct( } while (i < ARRAY_SIZE(hw_aux_lines)); /* TODO Generic I2C SW and HW */ - - return true; } struct i2caux *dal_i2caux_dce80_create( @@ -284,12 +279,6 @@ struct i2caux *dal_i2caux_dce80_create( return NULL; } - if (construct(i2caux_dce80, ctx)) - return &i2caux_dce80->base; - - BREAK_TO_DEBUGGER(); - - kfree(i2caux_dce80); - - return NULL; + construct(i2caux_dce80, ctx); + return &i2caux_dce80->base; } |