Remove the redundant null check since the caller ensures
that 'ctx' is never NULL.
Signed-off-by: Weiguo Li
---
v2:
* take Christian and Alex's suggestion
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdg
"ctx" is dereferenced but null checked later. Swap their positions
to avoid potential null dereference.
Found using a Coccinelle script:
https://coccinelle.gitlabpages.inria.fr/website/rules/mini_null_ref.cocci
Signed-off-by: Weiguo Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6
"ctx" is dereferenced but null checked later. Swap their positions
to avoid potential null dereference.
Found using a Coccinelle script:
https://coccinelle.gitlabpages.inria.fr/website/rules/mini_null_ref.cocci
Signed-off-by: Weiguo Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 6