amdgpu/dc: cleanup construct returns in gpio.
authorDave Airlie <airlied@redhat.com>
Fri, 29 Sep 2017 04:34:38 +0000 (14:34 +1000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Sep 2017 17:02:28 +0000 (13:02 -0400)
commit0e1c42fd181e7359be5c97655198551b6660f028
treeb6a02e881b311c807f1f4ce9b77f0d3dcc4b037a
parentb08c3ca4e90d03b3a120f4e60dba4b2b5e087433
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>
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c
drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c
drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.h
drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c