Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7895782imu; Mon, 3 Dec 2018 22:32:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/XCD5WVnkk8Zq3PwjIgZgYBPZzDN6SQ7i0ubxWfz31Hn9ZpFpiIr87PCuLMFVuXqfAR6mdJ X-Received: by 2002:a63:a112:: with SMTP id b18mr15925178pgf.440.1543905136989; Mon, 03 Dec 2018 22:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543905136; cv=none; d=google.com; s=arc-20160816; b=ufgXxRrlMXeYQvgbuN0MAulevDQUwY8jophpz6hnjiqRUB5sqtnw6i5KXP15df2dpS OQ2To12wc1/Pr6UpTzFrnBVLH3xOWlVMKoYuSLFFtCZZMPc9yDkf+C7KCVNrImsJwTQm uuQ6r+8A3/SzspF3zwWoRj2ogaYG5zu3xmxyzEZVHLQAdzFGtmE9B88KaEszjLvFEWhc uvGdTNY69Gvgqv2v15ALj5FVxZ+4HrSOHGi5V4CNBlmYu5oU9fu7wDjIZvSzfqsHV1Zi kPD+tRxC1X9y8cv9XeNB0eYvIuxZD+a+l1GROf0j7ZxQsove+6teET6rq9mcg9EA9ILs jjBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from; bh=bWiMHBRUO59J9SI7NWMCT/Wb1+zZJlEWKvQs8Gz6nzM=; b=g9V/NEbqv+ULCmMqNAxKUe19Ej2DvSlCr4jzAj1QkF8Azh4m84bKfgwJFr/Xc+QWmT rtRMCnGhRfNFel/EOhvptf1UVw1pA0togEMUySdxJkbDFt+8/82TOughSiW6OFvwyada jVL3HEV5fQet6a9dIcICR+qQ/KYiuNzZY1gMBeXBWXLzWEdeCzFr2doD1Kqo5J7c5KmT 48v4JvEpcNOdqFCDCOW086qSj2UEn9k9cR35C/SwytFvp6rVrhQVfoQ7Q6+7ex4aNFXR HlyWRJO1PKbZ+M4VmGEKovh9fUJTKrvVuSAPPk6lGJgkd3ato8gqqzsYGH79iWDVsjlT 5Mpg== 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 x15si14769789pgq.378.2018.12.03.22.31.59; Mon, 03 Dec 2018 22:32:16 -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 S1726034AbeLDGbW (ORCPT + 99 others); Tue, 4 Dec 2018 01:31:22 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:16077 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725999AbeLDGbW (ORCPT ); Tue, 4 Dec 2018 01:31:22 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A710BF148C697; Tue, 4 Dec 2018 14:31:18 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Tue, 4 Dec 2018 14:31:14 +0800 From: Wei Yongjun To: , , , , , CC: Wei Yongjun , , , , Subject: [PATCH -next] drm/amdgpu: Fix return value check in amdgpu_allocate_static_csa() Date: Tue, 4 Dec 2018 06:39:36 +0000 Message-ID: <1543905576-38015-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the return value check which testing the wrong variable in amdgpu_allocate_static_csa(). Fixes: 7946340fa389 ("drm/amdgpu: Move csa related code to separate file") Signed-off-by: Wei Yongjun --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c index 0c590dd..a5fbc6f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c @@ -43,7 +43,7 @@ int amdgpu_allocate_static_csa(struct amdgpu_device *adev, struct amdgpu_bo **bo r = amdgpu_bo_create_kernel(adev, size, PAGE_SIZE, domain, bo, NULL, &ptr); - if (!bo) + if (!r) return -ENOMEM; memset(ptr, 0, size);