From patchwork Fri May 19 00:26:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9735375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CCB366020B for ; Fri, 19 May 2017 00:26:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADF63288E6 for ; Fri, 19 May 2017 00:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F0B9288EE; Fri, 19 May 2017 00:26:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 88D5C288E6 for ; Fri, 19 May 2017 00:26:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ACAFD6E5FC; Fri, 19 May 2017 00:26:22 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id D84066E5FC; Fri, 19 May 2017 00:26:21 +0000 (UTC) Received: by mail-pg0-x242.google.com with SMTP id u187so7627579pgb.1; Thu, 18 May 2017 17:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PpngG+ZQJldM0vyjyKsJRveSbOvvCZcnc8TLeeY2f9o=; b=XKE3JWGEOGqpypKRxPzAgLhXyP/+3oh2IV9OK5M1YfNhvkPm2+kDmu76zzXCh/IfoB XgFSfRSfygQh6gzJKGCDGsiureaEQpyLlMVJYkJvVQxsX6v0FpQFvBzlnayQRxRVXcig 7PFhJR7V8rlY8xGb0c4zfTkXeFGaO8p/9814/TrDug51xO9RUV59umPS2MjBTOrXa2fM HCcDDydSQJQQJucFgtidjRjB0+TrZehVLKB/y69Dz16aYhLgrvDxYspS8Mp/HGVgNUK1 /a9XA3uuAeii3mrGsqE5yL3tfHsDdaJdMoiiUquS70giaAZjG1ifuXwpzAc2A6OJMPy+ ilPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PpngG+ZQJldM0vyjyKsJRveSbOvvCZcnc8TLeeY2f9o=; b=GQL39KXfwmosDLcBLLziRve4GwY3XPFu3iZbz8dO7GyqTBW/dnWA9uMZh3bBrHKirG 08owwpBYoE6/GG87sfMNeAM9zEEw9oRqc5u4z3Ck5BzPoFNbZblpAuhEnQfggUUsJZEl GtP/GbZPMXDb41ZLA8zkuMPUrVaqG06zZGAhuWaFPr0ado8fBmB9GfgSUx6fzS5xX0pg nTF1FGlL550IqOQtBXrrD4+1HH8BIcBvv5mePpJrK0KK5cnzdwUEjypDN9exdQ3kcl5w neBX7g3Xj4lz74SkWqpgruSCN3prPP1gsXO0pTG8miGwM2X2cy29d+24f5RqYxpyGFo9 1kEw== X-Gm-Message-State: AODbwcD1OnZTAt0ln2wh6QK/+/y/z4YpWTYI54Q5ssWHeUQBBWN9pc4e cC3Xj1gMbSdfNQ== X-Received: by 10.99.127.83 with SMTP id p19mr7387188pgn.51.1495153581467; Thu, 18 May 2017 17:26:21 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id 194sm11082376pgf.62.2017.05.18.17.26.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 17:26:20 -0700 (PDT) From: Wei Yongjun To: Daniel Vetter , Jani Nikula , David Airlie , Mika Kuoppala , Chris Wilson Date: Fri, 19 May 2017 00:26:05 +0000 Message-Id: <20170519002605.29993-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Cc: intel-gfx@lists.freedesktop.org, Wei Yongjun , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH -next] drm/i915: Fix return value check in kfence selftests 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-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix the return value check which testing the wrong variable. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/i915/selftests/i915_sw_fence.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c index 98baf10..c31d439 100644 --- a/drivers/gpu/drm/i915/selftests/i915_sw_fence.c +++ b/drivers/gpu/drm/i915/selftests/i915_sw_fence.c @@ -311,7 +311,7 @@ static int test_AB_C(void *arg) } C = alloc_fence(); - if (!B) { + if (!C) { ret = -ENOMEM; goto err_B; } @@ -388,7 +388,7 @@ static int test_C_AB(void *arg) } C = alloc_fence(); - if (!B) { + if (!C) { ret = -ENOMEM; goto err_B; }