From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 180CCC43461 for ; Fri, 11 Sep 2020 13:02:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B11382222A for ; Fri, 11 Sep 2020 13:02:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B11382222A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 407B16EA33; Fri, 11 Sep 2020 13:02:50 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id D02036EA33 for ; Fri, 11 Sep 2020 13:02:48 +0000 (UTC) IronPort-SDR: OntAZ58HIdCDUe5NSccKF/L2Q4lid46m2+TyOGoRmIsESL66/YlHOzqwqgZRokgkqXjH8j6Ik9 gQOA8UOAOf4A== X-IronPort-AV: E=McAfee;i="6000,8403,9740"; a="138766096" X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="138766096" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 06:02:39 -0700 IronPort-SDR: Nx+vspf96P+MLYgSd6gs6IYGfBXEM5+kyYtjZjE821A3B6Ry7IitqVB4Rs7NVIf1ANfrhF6Y5V GztvL2/GwPWQ== X-IronPort-AV: E=Sophos;i="5.76,415,1592895600"; d="scan'208";a="481318453" Received: from mlankri-mobl.ger.corp.intel.com (HELO [10.214.208.240]) ([10.214.208.240]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2020 06:02:32 -0700 To: Dan Carpenter , Jani Nikula References: <20200911113414.GC367487@mwanda> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <2c117e1e-2d51-a649-62df-7f9034dfe6cd@linux.intel.com> Date: Fri, 11 Sep 2020 14:02:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200911113414.GC367487@mwanda> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: test the correct variable in igt_gem_ww_ctx() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org, Chris Wilson , =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , Matthew Auld Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 11/09/2020 12:34, Dan Carpenter wrote: > There is a copy and paste error here. The "obj" should be "obj2". The > current code could result in an Oops. > > Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.") > Signed-off-by: Dan Carpenter > --- > drivers/gpu/drm/i915/selftests/i915_gem.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c > index 23a6132c5f4e..412e21604a05 100644 > --- a/drivers/gpu/drm/i915/selftests/i915_gem.c > +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c > @@ -211,8 +211,8 @@ static int igt_gem_ww_ctx(void *arg) > return PTR_ERR(obj); > > obj2 = i915_gem_object_create_internal(i915, PAGE_SIZE); > - if (IS_ERR(obj)) { > - err = PTR_ERR(obj); > + if (IS_ERR(obj2)) { > + err = PTR_ERR(obj2); > goto put1; > } > > Oopsie I did point this out in review! (msgid c03481f1-92c2-24ad-b56e-a92fbb70f9fe@linux.intel.com) Reviewed-by: Tvrtko Ursulin Regards, Tvrtko _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx