From: jsg Date: Fri, 12 May 2023 11:01:48 +0000 (+0000) Subject: swsmu/amdgpu_smu: Fix the wrong if-condition X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9674f587b51d2021e690a4c90e5616856a44247d;p=openbsd swsmu/amdgpu_smu: Fix the wrong if-condition From Yu Songping d78777c1d4de809d8bc9efc697cb636cbe8e32c2 in linux-6.1.y/6.1.28 484d7dcc709da46a5976c9530eeff931e9ecba82 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c b/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c index 1e071db5f34..2e0eb7d928a 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/amdgpu_smu.c @@ -161,7 +161,7 @@ int smu_get_dpm_freq_range(struct smu_context *smu, int smu_set_gfx_power_up_by_imu(struct smu_context *smu) { - if (!smu->ppt_funcs && !smu->ppt_funcs->set_gfx_power_up_by_imu) + if (!smu->ppt_funcs || !smu->ppt_funcs->set_gfx_power_up_by_imu) return -EOPNOTSUPP; return smu->ppt_funcs->set_gfx_power_up_by_imu(smu);