提交 bec5f70d 编写于 作者: H Huang Rui 提交者: Alex Deucher

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: NHuang Rui <ray.huang@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e68d4648
...@@ -591,12 +591,12 @@ bool atomctrl_get_pp_assign_pin( ...@@ -591,12 +591,12 @@ bool atomctrl_get_pp_assign_pin(
const uint32_t pinId, const uint32_t pinId,
pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment) pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment)
{ {
bool bRet = 0; bool bRet = false;
ATOM_GPIO_PIN_LUT *gpio_lookup_table = ATOM_GPIO_PIN_LUT *gpio_lookup_table =
get_gpio_lookup_table(hwmgr->device); get_gpio_lookup_table(hwmgr->device);
PP_ASSERT_WITH_CODE((NULL != gpio_lookup_table), 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, bRet = atomctrl_lookup_gpio_pin(gpio_lookup_table, pinId,
gpio_pin_assignment); gpio_pin_assignment);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册