drm/amdgpu: Use ternary operator in `vcn_v1_0_start()`
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / vcn_v1_0.c
index 6c9d5cd..dff5419 100644 (file)
@@ -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);
 }
 
 /**