Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1554105ybv; Thu, 20 Feb 2020 23:06:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxn4dxFO1lyMWAgj7wByXWvAptoP23gVo4A41V/mjbVF9IdEupPBWGUMfInNOzfBG7MTiP1 X-Received: by 2002:a05:6830:c9:: with SMTP id x9mr27081174oto.345.1582268762132; Thu, 20 Feb 2020 23:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582268762; cv=none; d=google.com; s=arc-20160816; b=ogCedg9WFVZOp7F9kF6iZ5gsKUUUfSiOADEgmkbNKDD8nB/lCr57WxpGPSe0+Ye+UK lZPgR2PSjiMNBVvI/se5OcpAbnwiAAaIDCX8sBGyg9JozQ9m1DCM2r6qKYZkw+QTcc2L 9t/dCjSVWdI34bQWhxZQF/DIoEi28Z83lBaQOTYmdA4WbpK40IVdiBZAWorAlT941LuQ DVs+u81ZYEJiLnxpbGLUr4xSxy3Qj4obQfBwYSkWkN5AnbhU0qhOt8E7fq8Mt47Te8DK xB8zGmfvDAm6lSvJFoIpxoOPr6fuyfrGmG+LlfWTbiyRADE2rHGQLE82cpb0jJIwKUw/ EYZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=ZHY1ivG3KqCf8Nk+DAKI9/T0dXNJREbyNfXwtmZ0Npo=; b=uCAEttVbsJjARpQVZHCjwZR8LzJziegox9YV2tjDCyUytnTdo0+JvwLfifUaKhcyQq bCM3IJrv9WbPEjPG7uPSclD6EcbLnCgbo9rA5Or5QQnL19h172yUsf9+5b2jCmih9fvb 47Z0usD/ALPKILv9fpqbYTqo+IrJmkBIExQdCdAsT71eAYe/m6fkpZisZ2df/aMDfKwV oOLgldAQ+RRe5M4cKCxWzno6lot4hEnljBW8c/Qdi2LnH1S3H5duH+xBSZr63VdvOzkW 55b88S6ewUpfOvqyqpCIelp+gteOUCzo4HQo1ovI1fFVcPEJcvgCH5y3RLv+s6PexqFM 1HWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h128si359255oif.258.2020.02.20.23.05.48; Thu, 20 Feb 2020 23:06:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726440AbgBUHFk (ORCPT + 99 others); Fri, 21 Feb 2020 02:05:40 -0500 Received: from inva021.nxp.com ([92.121.34.21]:37148 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbgBUHFj (ORCPT ); Fri, 21 Feb 2020 02:05:39 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 78435206BD2; Fri, 21 Feb 2020 08:05:37 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 68574206BCF; Fri, 21 Feb 2020 08:05:30 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id CD73A40246; Fri, 21 Feb 2020 15:05:21 +0800 (SGT) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, abel.vesa@nxp.com, john@phrozen.org, heiko@sntech.de, jonas.gorski@gmail.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization Date: Fri, 21 Feb 2020 14:59:36 +0800 Message-Id: <1582268376-1672-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need to initialize 'ret' in many functions, as it will get the return value from function call, so remove the initializtion of 'ret'. Signed-off-by: Anson Huang --- drivers/clk/imx/clk-sscg-pll.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c index acd1b90..d4a2be1 100644 --- a/drivers/clk/imx/clk-sscg-pll.c +++ b/drivers/clk/imx/clk-sscg-pll.c @@ -195,10 +195,10 @@ static int clk_sscg_pll2_find_setup(struct clk_sscg_pll_setup *setup, uint64_t ref) { - int ret = -EINVAL; + int ret; if (ref < PLL_STAGE1_MIN_FREQ || ref > PLL_STAGE1_MAX_FREQ) - return ret; + return -EINVAL; temp_setup->vco1 = ref; @@ -254,10 +254,10 @@ static int clk_sscg_pll1_find_setup(struct clk_sscg_pll_setup *setup, uint64_t ref) { - int ret = -EINVAL; + int ret; if (ref < PLL_REF_MIN_FREQ || ref > PLL_REF_MAX_FREQ) - return ret; + return -EINVAL; temp_setup->ref = ref; @@ -428,7 +428,7 @@ static int __clk_sscg_pll_determine_rate(struct clk_hw *hw, struct clk_sscg_pll_setup *setup = &pll->setup; struct clk_hw *parent_hw = NULL; int bypass_parent_index; - int ret = -EINVAL; + int ret; req->max_rate = max; req->min_rate = min; @@ -467,10 +467,10 @@ static int clk_sscg_pll_determine_rate(struct clk_hw *hw, uint64_t rate = req->rate; uint64_t min = req->min_rate; uint64_t max = req->max_rate; - int ret = -EINVAL; + int ret; if (rate < PLL_OUT_MIN_FREQ || rate > PLL_OUT_MAX_FREQ) - return ret; + return -EINVAL; ret = __clk_sscg_pll_determine_rate(hw, req, req->rate, req->rate, rate, PLL_BYPASS2); -- 2.7.4