drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm()
authorTom St Denis <tom.stdenis@amd.com>
Tue, 12 Sep 2017 13:51:36 +0000 (09:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Sep 2017 16:10:08 +0000 (12:10 -0400)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c

index a491f12..be83679 100644 (file)
@@ -86,8 +86,7 @@ int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
        uint32_t crystal_clock_freq;
 
        if (hwmgr->thermal_controller.fanInfo.bNoFan ||
-                       (hwmgr->thermal_controller.fanInfo.
-                               ucTachometerPulsesPerRevolution == 0))
+           !hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution)
                return -ENODEV;
 
        tach_period = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,