From patchwork Tue May 31 16:09:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 577459 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp1302715mag; Tue, 31 May 2022 09:12:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcTpjRpfayyD3nbwa4gJ38Lbls7giFMsGaqNddz+1CW0jpbK6Vr9Wrx83ulzipXUjMwqCJ X-Received: by 2002:a6b:fb05:0:b0:657:655e:a287 with SMTP id h5-20020a6bfb05000000b00657655ea287mr28275810iog.211.1654013552097; Tue, 31 May 2022 09:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654013552; cv=none; d=google.com; s=arc-20160816; b=tTQniBMfe5GXAgy83kPftH6GgDMFqXkPAXwC/SlRmJaCqnk54d/G3wPdcN5RQv53oT KkRvsSatKia4W+b8wk/hIzjvLSNCwQA8Zk6xhyngEEpJlcQjrVPpU1/WvVyurQ3jEewp 1txKmCLE9gJl86Yw8jgpFK3323UxWh6pWjmtdt9kTmqgvLQOyjXvpzqF3NPWOvSANOCK tCLA/NuAQtjrc2eXIYuDW5BYDHAo4a2UvKuX4okU4LNT18KB8oKjHDxRLBQOvdDjm7mr nV41mgowTKQb4q1zMvlsFjxbvxvVqiIFaBva5Yok3IeTHgD+SOszI5OS6Y5Ep73EBVta XWag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GfRWehbfLmvtTZVN78yMOQgVSehOAIauaunA+eD0YO4=; b=jZMgFkeHHX7HS8mSVbNV01LIhW7Z1VfYEZt2EtDBEuxUzkwE9z10Ix4NVPbqH9QCd0 ghCHMVivCPSu9+i0DhKTSW3W9ri4TjjcIwPmx5XDV7vzB3J10K6Au5TILEtpj98Vbqv7 I+WOn73ARTABHnIZ+Z3hbOyY8wV5jjbhEhtryPCXI9E+1Jnku/gr4au27BAjMv9NxjUs 83Urxu3DleXGBH/GbiQylo5VcA0eLuK04kbag7A6//FS39R1ONyPRdO+Fh3TX8Tpkhcx a36ntWCE+jB7xUqjtaVfQOZ7TdYEhfeqjjGrFdHdrvTft1ROHI41JyQGzvAPWof3XW2s fjRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TD4f4gKT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id r17-20020a056638301100b0032ee0615d1fsi15785489jak.67.2022.05.31.09.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TD4f4gKT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53BEA8432E; Tue, 31 May 2022 18:10:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TD4f4gKT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F3D1841A5; Tue, 31 May 2022 18:10:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 755F683EDE for ; Tue, 31 May 2022 18:09:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wr1-x434.google.com with SMTP id p10so19331101wrg.12 for ; Tue, 31 May 2022 09:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GfRWehbfLmvtTZVN78yMOQgVSehOAIauaunA+eD0YO4=; b=TD4f4gKTEXlU+c1eC4jLU8zDvUD3Jaq/S/mm5mb/32Ph/oxdTjAZA+mYUdC5HsBLtM +bDsak9pI7WFvBCz1wxl9Zo3GQ9Qv2+MUR4SQcIZzCaQsIZmX/qToB1TA99VI1raXcqJ tHdGOPwGCZfS+c3bk+QN5NV1mUGwjeXkzognLBBCkUCna/C4df2cK+H5+FmAWBVzmmhr wdGllksquFWyQVXzEDU/EQOwA2TSt2YOgqqu0x4vub2575EITenqIB9JMmYqDARc+ZZ7 MsJb2oBuGOPJhdLPc6ubxNPSxFoaf+YKUPp8sCDXZNS1c7f17G1jdBLM1cIkPPQvJirP 9cZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GfRWehbfLmvtTZVN78yMOQgVSehOAIauaunA+eD0YO4=; b=Hi/Kkr+z9olpAV0ot3POwBWDdB7h4X7KmxUygm/1rLrglcwUAQwrmA1UxwTWW5Alcy oucfuqRzQkK5mU/zUSTyQTmdd+9GNnGLUStK5g0MlMUm8yHU/03ZD1XiBtnBwOvCE51E cGF9pD94NZJQ4VqCNXjeXBDG9mLxEaUM9/hZBnOotWPH0jg0gglC8YrYZjTDWF9ot3Eo JM1d44hMc7a8/pUrHQrZio1iZcuPAxJ+iGpoJZanoSMsXQjF9fs72xIXPvXvdSqXKd1h qY6q/gBSu7gvHL9iQPFVDkJBbbJwGdEQ0iSgvp8E2RSeolkukaYUCzbNCYoBTiErLguW 9LTw== X-Gm-Message-State: AOAM533T69UPlX1jzJ/7Y3k5TKWNQGvlKvj3bogAyvG7j2a2R6z9+oL7 GPrjCeGXtb2yqF0yYYAZcGWsONO/0w/0XA== X-Received: by 2002:a5d:6847:0:b0:20f:c0b6:d783 with SMTP id o7-20020a5d6847000000b0020fc0b6d783mr44858389wrw.101.1654013390845; Tue, 31 May 2022 09:09:50 -0700 (PDT) Received: from lmecxl1178.lme.st.com ([2a04:cec0:117a:a94e:9569:2e63:8a35:2cc5]) by smtp.gmail.com with ESMTPSA id r23-20020a05600c321700b0039aa4d054f8sm2884035wmp.5.2022.05.31.09.09.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:09:50 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Patrick Delaunay , Patrice Chotard , etienne.carriere@linaro.org, Jaehoon Chung Subject: [PATCH v2 13/14] power: regulator: scmi: simplify scmi_voltd_set_enable() Date: Tue, 31 May 2022 18:09:28 +0200 Message-Id: <20220531160929.931150-14-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220531160929.931150-1-etienne.carriere@linaro.org> References: <20220531160929.931150-1-etienne.carriere@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Simplify scmi_voltd_set_enable() exit sequence. Cc: Jaehoon Chung Signed-off-by: Etienne Carriere Reviewed-by: Jaehoon Chung --- No change since v1. --- drivers/power/regulator/scmi_regulator.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/power/regulator/scmi_regulator.c b/drivers/power/regulator/scmi_regulator.c index 352daa9bbc9..801148036ff 100644 --- a/drivers/power/regulator/scmi_regulator.c +++ b/drivers/power/regulator/scmi_regulator.c @@ -51,11 +51,7 @@ static int scmi_voltd_set_enable(struct udevice *dev, bool enable) if (ret) return ret; - ret = scmi_to_linux_errno(out.status); - if (ret) - return ret; - - return ret; + return scmi_to_linux_errno(out.status); } static int scmi_voltd_get_enable(struct udevice *dev)