Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: Move assignment outside if condition

Fixes the following checkpatch errors:

ERROR: do not use assignment in if condition

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ran Sun and committed by
Alex Deucher
819362e4 a645529d

+4 -2
+4 -2
drivers/gpu/drm/radeon/radeon_legacy_tv.c
··· 724 724 } 725 725 726 726 for (i = 0; i < MAX_H_CODE_TIMING_LEN; i++) { 727 - if ((tv_dac->tv.h_code_timing[i] = hor_timing[i]) == 0) 727 + tv_dac->tv.h_code_timing[i] = hor_timing[i]; 728 + if (tv_dac->tv.h_code_timing[i] == 0) 728 729 break; 729 730 } 730 731 731 732 for (i = 0; i < MAX_V_CODE_TIMING_LEN; i++) { 732 - if ((tv_dac->tv.v_code_timing[i] = vert_timing[i]) == 0) 733 + tv_dac->tv.v_code_timing[i] = vert_timing[i]; 734 + if (tv_dac->tv.v_code_timing[i] == 0) 733 735 break; 734 736 } 735 737