diff options
author | Huang Rui <ray.huang@amd.com> | 2016-07-12 02:31:23 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-15 12:33:52 -0400 |
commit | bec5f70dad45f7ad63f97aa0988821532ebeade7 (patch) | |
tree | 54b4eb672d50af85c535babd81283efc216d6c74 | |
parent | e68d46484ff453c5aaf215da07f57a2cc29967f9 (diff) |
drm/amd/powerplay: fix the incorrect return value
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 4 |
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 23b1ac96c514..0f5c9d09641b 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | |||
@@ -591,12 +591,12 @@ bool atomctrl_get_pp_assign_pin( | |||
591 | const uint32_t pinId, | 591 | const uint32_t pinId, |
592 | pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment) | 592 | pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment) |
593 | { | 593 | { |
594 | bool bRet = 0; | 594 | bool bRet = false; |
595 | ATOM_GPIO_PIN_LUT *gpio_lookup_table = | 595 | ATOM_GPIO_PIN_LUT *gpio_lookup_table = |
596 | get_gpio_lookup_table(hwmgr->device); | 596 | get_gpio_lookup_table(hwmgr->device); |
597 | 597 | ||
598 | PP_ASSERT_WITH_CODE((NULL != gpio_lookup_table), | 598 | PP_ASSERT_WITH_CODE((NULL != gpio_lookup_table), |
599 | "Could not find GPIO lookup Table in BIOS.", return -1); | 599 | "Could not find GPIO lookup Table in BIOS.", return false); |
600 | 600 | ||
601 | bRet = atomctrl_lookup_gpio_pin(gpio_lookup_table, pinId, | 601 | bRet = atomctrl_lookup_gpio_pin(gpio_lookup_table, pinId, |
602 | gpio_pin_assignment); | 602 | gpio_pin_assignment); |