]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/powerplay: fix the incorrect return value
authorHuang Rui <ray.huang@amd.com>
Tue, 12 Jul 2016 06:31:23 +0000 (14:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jul 2016 16:33:52 +0000 (12:33 -0400)
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>
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c

index 23b1ac96c514c62366e17da92e7c30de0c564f0c..0f5c9d09641b7cb6af563c84950ac7a523f76513 100644 (file)
@@ -591,12 +591,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);