This is a note to let you know that I've just added the patch titled swsmu/amdgpu_smu: Fix the wrong if-condition to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: swsmu-amdgpu_smu-fix-the-wrong-if-condition.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 484d7dcc709da46a5976c9530eeff931e9ecba82 Mon Sep 17 00:00:00 2001 From: Yu Songping <yusongping@xxxxxxxxxx> Date: Thu, 24 Nov 2022 09:52:37 +0800 Subject: swsmu/amdgpu_smu: Fix the wrong if-condition From: Yu Songping <yusongping@xxxxxxxxxx> commit 484d7dcc709da46a5976c9530eeff931e9ecba82 upstream. The logical operator '&&' will make smu->ppt_funcs->set_gfx_power_up_by_imu segment fault when smu->ppt_funcs is NULL. Signed-off-by: Yu Songping <yusongping@xxxxxxxxxx> Reviewed-by: Evan Quan <evan.quan@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -161,7 +161,7 @@ int smu_get_dpm_freq_range(struct smu_co 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); Patches currently in stable-queue which might be from yusongping@xxxxxxxxxx are queue-6.1/swsmu-amdgpu_smu-fix-the-wrong-if-condition.patch