From patchwork Fri May 28 03:45:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 449476 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1093526jac; Thu, 27 May 2021 20:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsOfzHU+S/R/CfGw0C3CASk8wonODT79F76tmX1abBYFUKLyQ1x8D7Nt9ib/+4huEMeRth X-Received: by 2002:a62:1d0f:0:b029:2d5:3ec2:feb8 with SMTP id d15-20020a621d0f0000b02902d53ec2feb8mr1829996pfd.19.1622173531029; Thu, 27 May 2021 20:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622173531; cv=none; d=google.com; s=arc-20160816; b=dap3rFbIQurURSs+vEwsKwwsJ+K9lEOe4dz/a83YVCtyxVM1vc2lZuD6XER0UvMjDx uZv9I/hAzanbxotwifn2SVt4uIM3fJwirSYBJJ67OFCAGPenqZLIxb118jOVu1mWwWCd AKC9oU83oZeVUBDmnCXtdgLS7md1WiKTPWePye1pZ7lxTJBw/jn55UQv6YSsv04Cjx6a YWFRU2hh5IViZDYfOIcasOsoCZ+qWoJYypLlGZ1f32b2DwqXfxcawIM3QTCmlXX3/hNt ghQ5rCWlWbOmNlfYefwxBg7E5uMLOUzd41pomRMhpiaDQe7jty8hX0evcYsxiDcs5578 0x/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:delivered-to; bh=QKPRJvMeXXwkBLqOpAI9aKeLu6jTcs0fsUhzDuP2JP4=; b=FWzK+cNH6N2HCcibGP906udgq7zeB4RpIhDtlBoie7jXZEhZdUDUrYkD/ZMPxGpQCI S/ib+VSrxzht9Dhz9C05uNrDrz4JVMyfrZSFbjKOIR+AZdokaAEwGBUWpS/opKLezDuS NANQmbknRnn3ikQgGQDYWliT69PeBf5ytYr0MOTZWDgiuvOw3pi47uv9PWZYN+DWyyIL 77L4N3g62Jfc6t+93DSJPzOMcpH1EdDlgg/YMZRAykfg3If9xB9DOygfGSRCbeERXcUu gNICzRCixkYZXF3UxdtM5ZaEoK1giStHjOAcTV/bL1Ce8s/ydFgTi3y68h1amLncfZsj Mhag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id f6si4704209plb.277.2021.05.27.20.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 20:45:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 952EF6F56D; Fri, 28 May 2021 03:45:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by gabe.freedesktop.org (Postfix) with ESMTPS id 095C36F56D; Fri, 28 May 2021 03:45:25 +0000 (UTC) Received: from dggeml763-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Frr9Z2C6TzYq3C; Fri, 28 May 2021 11:42:42 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggeml763-chm.china.huawei.com (10.1.199.173) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 28 May 2021 11:45:22 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 28 May 2021 11:45:22 +0800 From: Zhen Lei To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , "Tvrtko Ursulin" , intel-gfx , dri-devel , linux-kernel Subject: [PATCH 1/1] drm/i915/selftests: Fix error return code in live_parallel_switch() Date: Fri, 28 May 2021 11:45:18 +0800 Message-ID: <20210528034518.9284-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The error code returned from intel_context_create() should be propagated instead of 0, as done elsewhere in this function. Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in parallel") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c index 5fef592390cb..7db9e31da385 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c @@ -338,8 +338,10 @@ static int live_parallel_switch(void *arg) continue; ce = intel_context_create(data[m].ce[0]->engine); - if (IS_ERR(ce)) + if (IS_ERR(ce)) { + err = PTR_ERR(ce); goto out; + } err = intel_context_pin(ce); if (err) {