Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2632105pxk; Mon, 14 Sep 2020 20:18:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLw3WxIWDZ3TrHOfNLqOm8N95dwitfmkeSYQdVXSJq3c3059wXkDUnts0W3P3X3OKLhLFA X-Received: by 2002:aa7:c885:: with SMTP id p5mr19894223eds.127.1600139916144; Mon, 14 Sep 2020 20:18:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600139916; cv=none; d=google.com; s=arc-20160816; b=HB/ptOGARS8IG0XhBswSnvsjP0vaP1aNa/TBfgpkcM/N5XFgewUx9UjmjAMekEvUWr 8CAcYHYGPwMsj1n1sZdD640eJyVENFvL6uo8AUrcFPxhPf0YwrKoq3sjnF624c7q90aU H7NCOBWMoKSuSX7Vqs4wzqKRVE95++jFpf9tVK1vdIR+uqLF1ZoRp17A+RIx20PofiAq A0p6k+21epYd6jsyD/NI0UR158EmXmxCrBwBuEbP31gitLWnfqqs3ihN8YvkK1wtQzsp YlMYcbyRY13F02omHmXcSxMjfM+ydERNePrUJgUwnd3Cpc67YbndTGG7i3HwUQXg6kYV onYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/qWVDCASGrupwV9JyWG9rVOnOXEyxffQY/mwb2teeCs=; b=b+01CFnRMAkyNwoTc+lhHuwmvMBOZKyYrpT8XqMMQvKy07ufi+WyyGQX8xlRPJt1Re ZO3Wr/M8dz1RXKpMvGVuOc0DSaC8xNXe0L2pBdw5x7j9o3F45Us9n5XdResBlBYT88OF Asxbbiu3a2cVIxJK5NoBYr1+jOzbrTCMQU4MNt5jlyC0zu6gOkrYqXjpmR7pK6WO62KK VunsuojsTvLmLo8j6OKzZz/BDnBqF66+Y9zPQFFH8ICa7Eg07lKJYrGdP7IGGudtLYqL tvURmpJ/yvahaNZhPQF9+BnjR0BX8XVb9pcR/qtipVHgEXUmOn8SobMPw1gUONLRVJre CO/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BkDvLW7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si8513297eje.505.2020.09.14.20.18.13; Mon, 14 Sep 2020 20:18:36 -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; dkim=pass header.i=@linaro.org header.s=google header.b=BkDvLW7n; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726035AbgIODRW (ORCPT + 99 others); Mon, 14 Sep 2020 23:17:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbgIODRT (ORCPT ); Mon, 14 Sep 2020 23:17:19 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D901AC06178A for ; Mon, 14 Sep 2020 20:17:17 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id g10so1856844otq.9 for ; Mon, 14 Sep 2020 20:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/qWVDCASGrupwV9JyWG9rVOnOXEyxffQY/mwb2teeCs=; b=BkDvLW7nAAL4GOlIYSYdl2x/5Qq28C/sTVEIPMBw26Rrbkvpt/Xb7lX5rpYZbODXBV aU94PH/Fu+cXV91D+Kiz0xT7RXFt5FXn4tVycuXCbyFArNvqP7lahl9DsDXz1cK3ZcFX QuOdnku7vWl4kAaGpxoclI8+BkG12hoyJfQfaEue9veJs+YiJ6nZYXG1I9runEiURDQM F47nnsIZqtvAt/xagjHNybWagPhUaz9tzKrsJTS+TNXk2ZsfZZ8nZo2Bpo2NCJvuN10d ILvdGoJ5MKTbeGGDDk2524IBboHEnvMkQQcAQr6fstWwN7km1oz5JGfce2AOXRYp7YIi 9tJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/qWVDCASGrupwV9JyWG9rVOnOXEyxffQY/mwb2teeCs=; b=TIrDRVaxCYJg4CP6fl3edufNdc7mxSrzSmmy8cW/l7uKqlmTu+OwpMagVRCNt51YR8 7IiWPOTDDfoowFqr7ARaYvHw2xI78SGvyWb9h5AdIY6HzjrIeyjj22xNfclL/xno1mjR oO7/9f1drHjmznpjVz/PhNMdK6wI4KvfAtIcyzXqTHhEpMPnSLfkYL1osTCj1LSpAApS ouoX0UcjphAqsxg8SkdPUMr8ajy+/1LLhqEqBYlkaTx3+Kespx4KsFX5U2iGW1cUPCOu XgW1cVFt2gqC2zPdDe6UbsdJIaxTdeMtgC2mhkPtBLo+KaA+nZ6VAo+418TiRBo1YpxD +Nug== X-Gm-Message-State: AOAM532ZGcbMN1LaqU8uK9rDWJJ1GoJ0NDUCqh1aM6rjlQDgrmA6ubc2 Hh+AzRPUnDJlEe8c0Gja0zsXXA== X-Received: by 2002:a05:6830:144f:: with SMTP id w15mr10880048otp.62.1600139836899; Mon, 14 Sep 2020 20:17:16 -0700 (PDT) Received: from yoga ([2605:6000:e5cb:c100:8898:14ff:fe6d:34e]) by smtp.gmail.com with ESMTPSA id l23sm4525960otk.79.2020.09.14.20.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 20:17:16 -0700 (PDT) Date: Mon, 14 Sep 2020 22:17:14 -0500 From: Bjorn Andersson To: Liu Shixin Cc: Niklas Cassel , Andy Gross , Kevin Hilman , Nishanth Menon , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] power: avs: qcom-cpr: simplify the return expression of cpr_disable() Message-ID: <20200915031714.GA670377@yoga> References: <20200915032629.1772569-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915032629.1772569-1-liushixin2@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 14 Sep 22:26 CDT 2020, Liu Shixin wrote: > Simplify the return expression. > > Signed-off-by: Liu Shixin Reviewed-by: Bjorn Andersson > --- > 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 >