Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2627791pxk; Mon, 14 Sep 2020 20:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjjE5gbzpN+gsL6k1zVzrjCLmilBEjlEy1s6etONPt7MN+eVt/2Z8gBX41CYjx2KpJeYPU X-Received: by 2002:a17:906:7f0b:: with SMTP id d11mr18533474ejr.439.1600139327328; Mon, 14 Sep 2020 20:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139327; cv=none; d=google.com; s=arc-20160816; b=Ay34HEkPeYk36/XvOJ8UwQIhw9nkDHf/3MEeJXX0SwLJ9pkPR486+HU/QVEV6TflxA WtT/CY370aTIdhUhPpIhvctp2/yEomtINMEep3444kXUUE0jyz8sAMP35bjKbIey9o74 CWtzj+EEjgJ9Djm1i/mEGkU3c6v31shWmZtjxW2yMnXT/nXZ3mFw0reSVEkIUpT/1QN6 URQRxCrT75Hu8+BhKwadHZuiFkgFaRsiEwO6S3EE0EVwPAKOnjDzqwM8WoUQgcWJGF3P BtP7mhCqERoReQ3agt+XDIUwkL/mttIM5j6RGqKaFVuoTSEWDXW7L4Le+0mJHi/wfPLj myaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oMNN18RyacgZmP5AwqnfWLXZ673Fi2q9mpM/PQRPbFA=; b=gpMLKNILIeAv40dmteinmMEHTb/A4KRz1xrhDRcsVzmBsYvCUn2xr3/syrVU2aA3cN T0pYlTYaWAaZsynJd3gMovoRDxb/fc3/sH97Jm+KWw4M71MEvicqfJNEVMpPAA65TQ4x TES9/NFS0Id5pcIVhCdmoDQlxSw3oNkoE6AJkSe/F/zy2Nm5lcNcYJ6L5Fh/YPyRy5ac xzFfidMVS3ThLpDG4l0Tvi822erta+8RqD5/+ZC6Q8k9eNcXoJqSRfB9Mtvj2rS131Ar Wg/iNe8eHAd4/s13/vnMw3dJxHPYltoSfyCTMtMxFt87AarAv6WFgGd65VtDq3ghNqxn wYGQ== 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 y2si2300828edp.120.2020.09.14.20.08.25; Mon, 14 Sep 2020 20:08:47 -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 S1726122AbgIODE5 (ORCPT + 99 others); Mon, 14 Sep 2020 23:04:57 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:41454 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726046AbgIODEC (ORCPT ); Mon, 14 Sep 2020 23:04:02 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6D36DA49835B84F75CA4; Tue, 15 Sep 2020 11:04:00 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 15 Sep 2020 11:03:51 +0800 From: Liu Shixin To: Niklas Cassel , Andy Gross , "Bjorn Andersson" , Kevin Hilman , Nishanth Menon CC: , , , Liu Shixin Subject: [PATCH -next] power: avs: qcom-cpr: simplify the return expression of cpr_disable() Date: Tue, 15 Sep 2020 11:26:29 +0800 Message-ID: <20200915032629.1772569-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify the return expression. Signed-off-by: Liu Shixin --- drivers/power/avs/qcom-cpr.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/power/avs/qcom-cpr.c b/drivers/power/avs/qcom-cpr.c index bd7c3e48b386..b24cc77d1889 100644 --- a/drivers/power/avs/qcom-cpr.c +++ b/drivers/power/avs/qcom-cpr.c @@ -665,8 +665,6 @@ static int cpr_enable(struct cpr_drv *drv) static int cpr_disable(struct cpr_drv *drv) { - int ret; - mutex_lock(&drv->lock); if (cpr_is_allowed(drv)) { @@ -676,11 +674,7 @@ static int cpr_disable(struct cpr_drv *drv) mutex_unlock(&drv->lock); - ret = regulator_disable(drv->vdd_apc); - if (ret) - return ret; - - return 0; + return regulator_disable(drv->vdd_apc); } static int cpr_config(struct cpr_drv *drv) -- 2.25.1