]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/powerplay: fix the coverity warning about negative check for an unsigned...
authorPrike Liang <Prike.Liang@amd.com>
Tue, 10 Mar 2020 00:20:01 +0000 (08:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Mar 2020 19:54:56 +0000 (15:54 -0400)
There will be a coverity warning because min and max are both unsigned.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index d454493bef14246afc0d256be2ff5555cebb1d7b..f18e3fadbc2647779a6617b8b65e4b5bb493b515 100644 (file)
@@ -214,9 +214,6 @@ int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,
 {
        int ret = 0;
 
-       if (min < 0 && max < 0)
-               return -EINVAL;
-
        if (!smu_clk_dpm_is_enabled(smu, clk_type))
                return 0;