Received: by 10.223.185.116 with SMTP id b49csp1199830wrg; Wed, 14 Feb 2018 13:14:05 -0800 (PST) X-Google-Smtp-Source: AH8x227loIlPxN8R0+piJcmHZXDXWETZvhRvVIlQvjp+/Cd4Ig3OVyktiLEXZYoya39QeEDJuXYT X-Received: by 2002:a17:902:6b88:: with SMTP id p8-v6mr305749plk.261.1518642845130; Wed, 14 Feb 2018 13:14:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518642845; cv=none; d=google.com; s=arc-20160816; b=ID6s8EOMXoJFz8t2sN4Xt7vUySSkuC6eNHW06UOfM+TBfG+yFimSX1++xTmU9NJfyx sybAIglGXVGPfwSpnhjor098Dn6R3kKemdgcVRwjpoCRlgh5z41NddySssO9CDRwihL/ kMV9t45J32X8YDyFbR4SarUbxbHGgZQhHwbSMqVCnDPe2CstnbLQ6LuolREtyhKuoY6f /wqfF4V4AAVSYwPMFJOqxNKLH/q0C7ddC2JErsRM9KMc2nWLypBgSQrW3rxRn3VWZrUp sKXfI1NE3I7J8awZN4LELa1E0kIvDJrxOH2bVfC1ThavD2nQ/6m32c87iQ7v4rtDu6Dl wvEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=9/jXZpPW38c6UwbQ2ry2r4hTqyzUBq+Ujg29gzBcqgw=; b=yNXYIcoy56EL/T7n19wtGf4TlwO4++LsujOoe6AGhXxXZ8ruWXvffuIxg5N3VFjJTZ k0I/bEpmrc4hZkXUdIkQyBu+/3qgG3FWktv0AQPVXyiRhFyOAeGy1VegetG7G+n64ya1 H0PT719qwY6pt97wMUY+pt+COdeefLNzPOzU+ghwfBF7sY3gPHEn57/fuGTs8h74JVMl fqSE6Kb5OXwDTgD+33mrqik/2fQbT+sPDEwQzMij/rhb7mxLWPxilkUsyozA27ltSlCL A3BDarO6mXKQXcxHIH9UnOJebfy52214z/+0104Jn3XwGlmUGL1dB8nhejHCFEPRE3xy 20nA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si8437380pgc.649.2018.02.14.13.13.50; Wed, 14 Feb 2018 13:14:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031257AbeBNVMj (ORCPT + 99 others); Wed, 14 Feb 2018 16:12:39 -0500 Received: from gateway36.websitewelcome.com ([192.185.193.12]:24586 "EHLO gateway36.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030501AbeBNVMh (ORCPT ); Wed, 14 Feb 2018 16:12:37 -0500 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 0032E4011F364 for ; Wed, 14 Feb 2018 15:12:36 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id m4M0e7myfODN4m4M0e0deM; Wed, 14 Feb 2018 15:12:36 -0600 Received: from [189.175.4.238] (port=34610 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.89_1) (envelope-from ) id 1em4M0-000BrN-Gw; Wed, 14 Feb 2018 15:12:36 -0600 Date: Wed, 14 Feb 2018 15:12:34 -0600 From: "Gustavo A. R. Silva" To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] drm/i915/selftests: fix inconsistent IS_ERR and PTR_ERR Message-ID: <20180214211234.GA22341@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.175.4.238 X-Source-L: No X-Exim-ID: 1em4M0-000BrN-Gw X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.175.4.238]:34610 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 7 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. The proper pointer to use is _explode_ instead of _purge_. This issue was detected with the help of Coccinelle. Fixes: fe215c8bc426 ("drm/i915/selftests: add missing gtt shrinker test") Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c index d806427..89b6ca9 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c @@ -927,7 +927,7 @@ static int shrink_boom(struct drm_i915_private *i915, explode = fake_dma_object(i915, size); if (IS_ERR(explode)) { - err = PTR_ERR(purge); + err = PTR_ERR(explode); goto err_purge; } -- 2.7.4