summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2016-07-12 14:31:23 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-20 18:11:00 +0200
commitb1fa9693c0047a22ba8181a2078ba7a29d1a9591 (patch)
tree2dc71e3f1f438218c20db818920f9f5701e9d482 /drivers/gpu
parentced8d2e3b7baace9046ed545c645c62c3e19935f (diff)
downloadlinux-stable-b1fa9693c0047a22ba8181a2078ba7a29d1a9591.tar.gz
linux-stable-b1fa9693c0047a22ba8181a2078ba7a29d1a9591.tar.bz2
linux-stable-b1fa9693c0047a22ba8181a2078ba7a29d1a9591.zip
drm/amd/powerplay: fix the incorrect return value
commit bec5f70dad45f7ad63f97aa0988821532ebeade7 upstream. The return value 0 (false) means fail to find GPIO in atomctrl_get_pp_assign_pin. "-1" returns true as bool actually. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
index 90b35c5c10a4..ffc7c0dd3f14 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
@@ -592,12 +592,12 @@ bool atomctrl_get_pp_assign_pin(
const uint32_t pinId,
pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment)
{
- bool bRet = 0;
+ bool bRet = false;
ATOM_GPIO_PIN_LUT *gpio_lookup_table =
get_gpio_lookup_table(hwmgr->device);
PP_ASSERT_WITH_CODE((NULL != gpio_lookup_table),
- "Could not find GPIO lookup Table in BIOS.", return -1);
+ "Could not find GPIO lookup Table in BIOS.", return false);
bRet = atomctrl_lookup_gpio_pin(gpio_lookup_table, pinId,
gpio_pin_assignment);