Fix warning from kernel test robot
v2: remove the local variable as well
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Nirmoy Das <nirmoy.das@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
 static int jpeg_v3_0_wait_for_idle(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-       int ret;
 
-       ret = SOC15_WAIT_ON_RREG(JPEG, 0, mmUVD_JRBC_STATUS,
+       return SOC15_WAIT_ON_RREG(JPEG, 0, mmUVD_JRBC_STATUS,
                UVD_JRBC_STATUS__RB_JOB_DONE_MASK,
                UVD_JRBC_STATUS__RB_JOB_DONE_MASK);
-       if (ret)
-               return ret;
-
-       return ret;
 }
 
 static int jpeg_v3_0_set_clockgating_state(void *handle,