Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4140257pxu; Mon, 30 Nov 2020 19:16:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9kQkR3iKvzKNa+Rx2Kj2WQ5UxNft+nwxKLse7vhswNxEbO3HhUCLnsJv1RwLMZQYnwC48 X-Received: by 2002:a17:906:fa88:: with SMTP id lt8mr1081461ejb.408.1606792561699; Mon, 30 Nov 2020 19:16:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606792561; cv=none; d=google.com; s=arc-20160816; b=ZPC0XlQmEAHWmV2cFiyA96GQr7pVoibeFAwhcSYYWDA/uOQ62VVV4gq5pJtR9AF+LP b1i4/QB8JOi5MTzqoI4rLbLtUNamHLb91sdn27/zYpGSoQRtW8yfTq9K250QpJul6n7+ G6tX4cHez2+WofIbES2cHHWVgtW0Hw4ftMRptgvtApIp9PTzVUkd5zU5UlomtO1Fzlrw yOU/onmYWSG+kOVhp66BjDJpffsf5I4wjKKGe8PGbztziLrBkLw2YmRDDqnBq4E+2i8o /U0cLDXtCBakzOjS3UTef5ctcV9vMa+0YQ5UJ2Yc0CWcGhzrrqwIP0mjzrZie4oKL7eJ rUsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=gnCgr28WEiDduK90s68FeRurpfqrU8CADp/ISUAFXek=; b=zMrszUNeZkc9bCNa8+TQX5AHvKjtuiowFBoJvYAaH1z6AGZy4vRpDMiGirHl0X+EFH ML3PL98uE+IlsIcHuxkjYbVZ3CI2bqZ0mErQvQkINQBTvAtd7wQrlqwsajHwVf+SNCOT 8C9o7qdrpLA0dxs/57nFoe1gP2xlCzQ3r5dwIXVq8WRdeh8EO8xTQcJnckl0P0azvFnA 4MRGkB7PCY9yqdC3DvsbLllo+O0VVdOkJVnh4U2AgrhWSsHz1oSLiGFVFsM6v06y4K7V lyJp2xYmrz+iOZXfPBK/xWupCqG99dV5pOCZC8jfQVj41gRXm95rjma1qygl/vAEjs8P 0awA== 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 h28si367683edj.354.2020.11.30.19.15.37; Mon, 30 Nov 2020 19:16:01 -0800 (PST) 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 S1727242AbgLADLJ (ORCPT + 99 others); Mon, 30 Nov 2020 22:11:09 -0500 Received: from server-x.ipv4.hkg02.ds.network ([27.111.83.178]:51584 "EHLO mail.gtsys.com.hk" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgLADLI (ORCPT ); Mon, 30 Nov 2020 22:11:08 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.gtsys.com.hk (Postfix) with ESMTP id DF2B7200D28A; Tue, 1 Dec 2020 11:10:21 +0800 (HKT) X-Virus-Scanned: Debian amavisd-new at gtsys.com.hk Received: from mail.gtsys.com.hk ([127.0.0.1]) by localhost (mail.gtsys.com.hk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRNd_2PMXOKD; Tue, 1 Dec 2020 11:10:21 +0800 (HKT) Received: from s01.gtsys.com.hk (unknown [10.128.4.2]) by mail.gtsys.com.hk (Postfix) with ESMTP id C5B26200D287; Tue, 1 Dec 2020 11:10:21 +0800 (HKT) Received: from armhf2.gtsys.com.hk (unknown [10.128.4.15]) by s01.gtsys.com.hk (Postfix) with ESMTP id B5F1AC019E2; Tue, 1 Dec 2020 11:10:21 +0800 (HKT) Received: by armhf2.gtsys.com.hk (Postfix, from userid 1000) id 888CE200756; Tue, 1 Dec 2020 11:10:21 +0800 (HKT) From: Chris Ruehl Cc: Chris Ruehl , Kishon Vijay Abraham I , Vinod Koul , Heiko Stuebner , Douglas Anderson , Ulf Hansson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] phy: rockchip-emmc: emmc_phy_init() always return 0 Date: Tue, 1 Dec 2020 11:10:14 +0800 Message-Id: <20201201031015.23314-1-chris.ruehl@gtsys.com.hk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rockchip_emmc_phy_init() return variable is not set with the error value if clk_get() failed. The debug message print 0 on error and the function always return 0. Fix it using PTR_ERR(). Fixes: 52c0624a10cce phy: rockchip-emmc: Set phyctrl_frqsel based on card clock Signed-off-by: Chris Ruehl --- drivers/phy/rockchip/phy-rockchip-emmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/rockchip/phy-rockchip-emmc.c b/drivers/phy/rockchip/phy-rockchip-emmc.c index 48e2d75b1004..75faee5c0d27 100644 --- a/drivers/phy/rockchip/phy-rockchip-emmc.c +++ b/drivers/phy/rockchip/phy-rockchip-emmc.c @@ -253,6 +253,7 @@ static int rockchip_emmc_phy_init(struct phy *phy) */ rk_phy->emmcclk = clk_get(&phy->dev, "emmcclk"); if (IS_ERR(rk_phy->emmcclk)) { + ret = PTR_ERR(rk_phy->emmcclk); dev_dbg(&phy->dev, "Error getting emmcclk: %d\n", ret); rk_phy->emmcclk = NULL; } -- 2.20.1