From patchwork Fri May 13 06:26:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 572077 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp198411mal; Thu, 12 May 2022 23:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYTJ/R40A0O/vF2fAa2BC8yeMR662MF/ev/UXZF9xn/3fR1VWkrND8gX2DOLU+UErmmoqj X-Received: by 2002:a05:6402:4396:b0:427:f2dc:b11 with SMTP id o22-20020a056402439600b00427f2dc0b11mr39020578edc.298.1652423458139; Thu, 12 May 2022 23:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652423458; cv=none; d=google.com; s=arc-20160816; b=k7fec5sinpNUzHnfBqQGJDEoMvdTVfYZyeTkSBRt0YkrlrgIEAmlDNGUFW7gpYn7dC lD6qGkv4ZTNGY1W1bRUI5q1pTuQtUBEQRLMWDxL8c6D+ypK6FordUffe17egb31yCJZK LvtQqlCCfgDouIxNPwdnPDxxwQHC+UNevez6HXPICUr4nvdaEibwqcIyuRAGu9d/7t45 guWam4MJE1Ato3HmpWqIi9GnHFvzl/K/azvxR1NQ/AFjWJ6HcPSvND5WToTCnMKPhHQ2 4LW0hQ3UBLyu1FdSB/IgpvHO8vC5Zk6uOywFbZGRmR1AwhPgjm6t/t/ZOPecTuNnCJaa eWRQ== 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=QSCG4xhEc59nDnZu8GJwTA9PqTEhzX+td3hwKVs6lJI=; b=sqHoutnjXp/BwA9NHJsMR7pbtpqOcg9jqHUPr75JSIpqgrz7RBqs/3E2ugW8tVsXcq y0EXu7hfFQNuVfrmrqca+R9EUgwqPAKEa6f8DSZFMRX5ASgr8m7+eAxQSpTrbeBAnwMu x7n/NwjaCLz2DBbT5OkDVT85PTeS5BBeNfgGSi2zqkptozuqu/YLm9qS/FCZPVKUu4NU IKP2aLFhxaAn+NKdgOUjrfUk6EOIOcn8woOlBZOIWEZvdxY6xx5mb/PM96fwrORfsiUL 2aYQml8avWxCRenq7btvEdxcyF3qUEJ2MYI0WffqmKvQu8aHsuTX334cc1ycuP1QNNJC YyDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FsLOwKAo; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id dr2-20020a170907720200b006e06d4769f3si1197474ejc.692.2022.05.12.23.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 23:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FsLOwKAo; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 A271F840D7; Fri, 13 May 2022 08:29:27 +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="FsLOwKAo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE57883EDC; Fri, 13 May 2022 08:28:43 +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-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 478B983EA4 for ; Fri, 13 May 2022 08:28:38 +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-x42c.google.com with SMTP id w4so9998092wrg.12 for ; Thu, 12 May 2022 23:28:38 -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=QSCG4xhEc59nDnZu8GJwTA9PqTEhzX+td3hwKVs6lJI=; b=FsLOwKAoUQmT3excug3DGFbn07buveLGsZCQo7lYkWqE81JPZNcmm/UtVXL8fAyKJc kgKcC69NtAjyVo0h4xYGS36RYWKa/5BUxl8DS64eWugtO9foZWj18tDK05uMj2e/b+JT 3qMbvekYekdxps2qdg09MC7SbmKicGH+aR48wTG9S6DzEhmYjc4aVCskMtfoj9HIFPr1 j1o3U4EX9HYi3+5yfDaSsCfu5K5dkMN7y4SntyO/Hwn9P2or8Jcaw7gI6ZJeAdggcAe5 LotbMXMEeE8l/99x/f8SuwrE0Ge9F9L6qMt1uHvpixUzrpIO8TjvyUEdu3BYwZZ7WHN0 NQFw== 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=QSCG4xhEc59nDnZu8GJwTA9PqTEhzX+td3hwKVs6lJI=; b=Jq/jfJETGlE4Kpk++xlyXjml7susTDPyFY4UsaDDjhmY9i0YRv8C0aeBlQllAzqX6e 8VCVWLGHPlQ+ZlT6sd4LgY4dm9bOtnyJeLFv3kjQ2DwctlhYmGONL8gU/DpoXSBwvVcc 0XzGpPYgFQFWabMNiZnE4ooP4OGZJmWA6yB8PG9hqCmRmE0ZEtJpqYBUQAmBOMU9rbnx aQs9JcwJOKtcR9fVs/id/2FdE4BMQjpDzatgkuu7ui/4gP6Ik4o0YHvCc4QhvNSlRyI+ X+MAK/P6V6oGfMc1uDhbaR8lJb998w8ENR6YF/YZu/8CsqapviP1ayABqiwQ+idzmazJ LcwA== X-Gm-Message-State: AOAM531gJNLK8Mup8CnW64mq8dXcH+EAOhT38eMgWPSyPeFlrSzh7aUA FcoxZzT1rD5Z50otsrUSlBJP2kbMwzPzEg== X-Received: by 2002:a05:6000:1367:b0:20a:d222:35c8 with SMTP id q7-20020a056000136700b0020ad22235c8mr2506829wrz.577.1652423317335; Thu, 12 May 2022 23:28:37 -0700 (PDT) Received: from lmecxl1178.lme.st.com ([2a04:cec0:1194:a3aa:dc31:6fc0:bd75:771a]) by smtp.gmail.com with ESMTPSA id s18-20020a7bc0d2000000b003942a244eebsm1414235wmh.48.2022.05.12.23.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 23:28:37 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Patrick Delaunay , Patrice Chotard , Etienne Carriere , Jaehoon Chung Subject: [PATCH 13/14] power: regulator: scmi: simplify scmi_voltd_set_enable() Date: Fri, 13 May 2022 08:26:21 +0200 Message-Id: <20220513062622.155433-14-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220513062622.155433-1-etienne.carriere@linaro.org> References: <20220513062622.155433-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 --- 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 e0343e913f4..6affa457991 100644 --- a/drivers/power/regulator/scmi_regulator.c +++ b/drivers/power/regulator/scmi_regulator.c @@ -43,11 +43,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)