Remove the redundant null check since the caller ensures
that 'ctx' is never NULL.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Weiguo Li <liwg06@foxmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
struct amdgpu_device *adev = ctx->adev;
enum amd_dpm_forced_level current_level;
- if (!ctx)
- return -EINVAL;
-
current_level = amdgpu_dpm_get_performance_level(adev);
switch (current_level) {
enum amd_dpm_forced_level level;
int r;
- if (!ctx)
- return -EINVAL;
-
mutex_lock(&adev->pm.stable_pstate_ctx_lock);
if (adev->pm.stable_pstate_ctx && adev->pm.stable_pstate_ctx != ctx) {
r = -EBUSY;