From patchwork Mon Jul 13 09:23:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 6776661 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 72DBDC05AC for ; Mon, 13 Jul 2015 09:24:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B1B92068F for ; Mon, 13 Jul 2015 09:24:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 88F9420614 for ; Mon, 13 Jul 2015 09:24:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D01896E82C; Mon, 13 Jul 2015 02:24:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 485006E82C for ; Mon, 13 Jul 2015 02:24:28 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 13 Jul 2015 02:24:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,461,1432623600"; d="scan'208";a="763352599" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga002.jf.intel.com with ESMTP; 13 Jul 2015 02:24:28 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ZEZyD-000Gom-0h; Mon, 13 Jul 2015 17:24:17 +0800 Date: Mon, 13 Jul 2015 17:23:28 +0800 From: kbuild test robot To: Archit Taneja Message-ID: <20150713092328.GA6485@snb> References: <201507131726.z7r13iOk%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201507131726.z7r13iOk%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, kbuild-all@01.org Subject: [Intel-gfx] [PATCH] drm/amdgpu: fix odd_ptr_err.cocci warnings X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Fengguang Wu --- 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; }