Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2953754pxk; Mon, 21 Sep 2020 01:06:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7N+0Zh/z7EW5RoYaNDJWFWA6cd0DBNWnLkJzqkZWTEHJ9fYNlxjOnem2cARImVMbprxo0 X-Received: by 2002:a17:906:f246:: with SMTP id gy6mr47910406ejb.373.1600675585283; Mon, 21 Sep 2020 01:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675585; cv=none; d=google.com; s=arc-20160816; b=yqrlamtkfnu9S0n4gpcrjllaD7nTWV6AUAl+0ZleLkqfT0zuHyq5ZYHkZVkDR33EoB B+bmBy2WD58xxNl35lI012HQpfXNC6sEXA1yPoPiBiWfylnQlEd/jkRu3R0S7uyyZnQ1 NjVMEIinTZpRsZ0fFTcJflBjsRhWXmefxcX0UmQZdMTVjDZr7w7uIqsNV67UpbqFFw9T bXKa+BQlHB7N4xp/B/zRQvJDmeEmc/sz7amf4avq4QSn3L0br32rXtENVSdtlPKbtRtN pi+S5LQbnk+nxfZOy9h8Jbq3ys1axFCTEDjmeFn2YYM/6rUaBgsrlG+na27ZH8yU/Kh8 5uGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jIP74QsbEGbNMvhw4B90Q3AP4Q1X5+O2/08okdDRE+Q=; b=rlGKFjLC4ijX/0q0rNYsfjxmDTVIykvYPuv51t8mO59rfwS/KUpT6XBBDWMW2ubT6p YJsPjoYP7+yun1qving0kH0Xpw6qT9DHGj9oyGWBwMaV/FQRzZNfzdgFOgSlKXtQ9nsS fuuY5x9BD1cKo9jk1jR2VtSBkeHyBkxt7Job+fTSS4IYmPPiQqbJsGivhwTrafC1ihtB C+oJhONKm6pfD620T3yQ/I9yyoGZX6FCyRF88pO9xRYK/ntUEK1W2QU84pFB5Iv6KMDt YwuH6WkJ2U7ozVwQLxlvZ8JypD2b4DBln5FQLXla0t9q/hEKcBFWuh5dpVOewwR44/Lc E9KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si9118897ejb.143.2020.09.21.01.06.02; Mon, 21 Sep 2020 01:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727085AbgIUIEA (ORCPT + 99 others); Mon, 21 Sep 2020 04:04:00 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35148 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726565AbgIUICT (ORCPT ); Mon, 21 Sep 2020 04:02:19 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 29D167B954BCB2482875; Mon, 21 Sep 2020 16:02:17 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 16:02:06 +0800 From: Liu Shixin To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter CC: , , , Liu Shixin Subject: [PATCH -next] drm/amd/pm: simplify the return expression of smu_hw_fini Date: Mon, 21 Sep 2020 16:24:30 +0800 Message-ID: <20200921082430.2591201-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 5c4b74f964fc..3612841d40dc 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1214,7 +1214,6 @@ static int smu_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct smu_context *smu = &adev->smu; - int ret = 0; if (amdgpu_sriov_vf(adev)&& !amdgpu_sriov_is_pp_one_vf(adev)) return 0; @@ -1230,11 +1229,7 @@ static int smu_hw_fini(void *handle) adev->pm.dpm_enabled = false; - ret = smu_smc_hw_cleanup(smu); - if (ret) - return ret; - - return 0; + return smu_smc_hw_cleanup(smu); } int smu_reset(struct smu_context *smu) -- 2.25.1