From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81316C64E7A for ; Tue, 1 Dec 2020 03:11:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22411206B7 for ; Tue, 1 Dec 2020 03:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727412AbgLADLJ (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE15FC71156 for ; Tue, 1 Dec 2020 03:10:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1661B20671 for ; Tue, 1 Dec 2020 03:10:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TD3YoQw7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1661B20671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gtsys.com.hk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=RiqiZFi7ooQO5ukdwZPchQMxcoctWAKMmlYc4tg9tgY=; b=TD3YoQw7oBSX3iRVpNU65zZzJx sqlGnnyycioCP82X4PMOAR/xpPhrBtGJkn0dWRsYoWZPr5sfPMWX4c3giDbpT5TuJCB6wv9osYOol P1TAsTCzWffPZGltp3dOWuUZv23m1X6bco2STQ1XYnBt+cxnNUAf1XfHvukezF/3sIJ5oYvK6cSuO SY0pnrn+kCNOYOGz1G2WbxEFZKDfR10pp++8vrukdr/lrv0O/OeqIDanZUJydrfvm2rt5Eiu7QYIA TX4kZg9VpBV1RK0CgMeYuWfFnEK/inzyAh2xNM/mGzlrLtX5k6R3dWKdSOkn72OD1X6r2E3tFwHcj DN3O5ctA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjw3j-00037v-Lj; Tue, 01 Dec 2020 03:10:31 +0000 Received: from [27.111.83.178] (helo=mail.gtsys.com.hk) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjw3e-00035k-TK; Tue, 01 Dec 2020 03:10:28 +0000 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 To: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_221027_157357_E94DF09A X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Heiko Stuebner , linux-kernel@vger.kernel.org, Douglas Anderson , Kishon Vijay Abraham I , linux-rockchip@lists.infradead.org, Vinod Koul , Chris Ruehl , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.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 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70947C64E7A for ; Tue, 1 Dec 2020 03:11:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCCC4206B7 for ; Tue, 1 Dec 2020 03:11:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NgBXLrDJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCCC4206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gtsys.com.hk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=14bpoHfc2MCMy1oX0Iu3xs+oU1yAsLqYKnNH3fQbAJE=; b=NgBXLrDJugvVv43TB0J5IubrLx /qbHVIo6iHybWFqwmqHOWVhQYZ+pDq9xLW9B+y/XyCL7u+WZ/oBN3qI1mtZxLErZcuWgVeU0hWoWO vZkKUmBm9bfWJYi6meSLJCpKmTrzjCqmoHOaF9U36n7HO0yzfck5YwyH8KEfaGHaP8yVXjD2mHIRP 7qFT+mUat00BVkvXROUR4z7RF1F5mRwnx3QBO35U+TDdASmzeZpIuCqhuv3ZzeJnZCwNCrT6Qt82b jJQO7XsrJ/LtZlEyN2F8vMnOjTk4gPetN38xW1mJB2TyBvH+UFsE3dFL42rKLdrEmCLOJ/WgzQGwY 4ZRMkiuw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjw3h-00037I-HR; Tue, 01 Dec 2020 03:10:29 +0000 Received: from [27.111.83.178] (helo=mail.gtsys.com.hk) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjw3e-00035k-TK; Tue, 01 Dec 2020 03:10:28 +0000 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 To: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_221027_157357_E94DF09A X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Heiko Stuebner , linux-kernel@vger.kernel.org, Douglas Anderson , Kishon Vijay Abraham I , linux-rockchip@lists.infradead.org, Vinod Koul , Chris Ruehl , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel