amdgpu/dc: cleanup construct returns in gpio.

This is similiar to previous patches, don't return when we don't
need to, also do error checking before allocating memory, makes
it simpler to cleanup after.

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>
This commit is contained in:
Dave Airlie
2017-09-29 14:34:38 +10:00
committed by Alex Deucher
parent b08c3ca4e9
commit 0e1c42fd18
4 changed files with 31 additions and 57 deletions

View File

@@ -176,7 +176,7 @@ enum gpio_result dal_hw_gpio_config_mode(
}
}
bool dal_hw_gpio_construct(
void dal_hw_gpio_construct(
struct hw_gpio *pin,
enum gpio_id id,
uint32_t en,
@@ -194,8 +194,6 @@ bool dal_hw_gpio_construct(
pin->store.mux = 0;
pin->mux_supported = false;
return true;
}
void dal_hw_gpio_destruct(