[Intel-gfx] [PATCH] drm/amdgpu: fix odd_ptr_err.cocci warnings
kbuild test robot
fengguang.wu at intel.com
Mon Jul 13 02:23:28 PDT 2015
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:205:5-11: inconsistent IS_ERR and PTR_ERR, PTR_ERR on line 206
PTR_ERR should access the value just tested by IS_ERR
Semantic patch information:
There can be false positives in the patch case, where it is the call
IS_ERR that is wrong.
Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci
CC: Archit Taneja <architt at codeaurora.org>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---
amdgpu_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -203,7 +203,7 @@ static int amdgpufb_create(struct drm_fb
/* okay we have an object now allocate the framebuffer */
info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) {
- ret = PTR_ERR(ret);
+ ret = PTR_ERR(info);
goto out_unref;
}
More information about the Intel-gfx
mailing list