Commit 07d01469 authored by Paul Menzel's avatar Paul Menzel Committed by Alex Deucher
Browse files

drm/amdgpu: Use ternary operator in `vcn_v1_0_start()`



Remove the boilerplate of declaring a variable and using an if else
statement by using the ternary operator.

Reviewed-by: default avatarJames Zhu <James.Zhu@amd.com>
Signed-off-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1cbd7887
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1102,13 +1102,8 @@ static int vcn_v1_0_start_dpg_mode(struct amdgpu_device *adev)

static int vcn_v1_0_start(struct amdgpu_device *adev)
{
	int r;

	if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)
		r = vcn_v1_0_start_dpg_mode(adev);
	else
		r = vcn_v1_0_start_spg_mode(adev);
	return r;
	return (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ?
		vcn_v1_0_start_dpg_mode(adev) : vcn_v1_0_start_spg_mode(adev);
}

/**