Message ID | 20150713092328.GA6485@snb (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- 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; }
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@codeaurora.org> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- amdgpu_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)