From patchwork Wed Sep 2 15:03:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 293068 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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 6A239C433E7 for ; Wed, 2 Sep 2020 15:35:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4093420767 for ; Wed, 2 Sep 2020 15:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599060919; bh=UZsEqgnFpRCIfv/X8lhKedsjXG7tPysKFsM4O+5c1og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rO60V2Vnsalg6phk2O5twncD98e1mCTWMuONy2Ow8jk7NFcvBN8FJC1eVmm5U4xjB UuI9O2gOPR3uw4xXpraMbivs9zDf8whdNTm+mlvXnxnaQ2EQ+QTGZcbsQ0CHAwPq47 XIFqPt+/WmfADF0IzJ604YqcmzT5+uO9BCO4JdrY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727851AbgIBPEc (ORCPT ); Wed, 2 Sep 2020 11:04:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726927AbgIBPEZ (ORCPT ); Wed, 2 Sep 2020 11:04:25 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9506721527; Wed, 2 Sep 2020 15:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599059065; bh=UZsEqgnFpRCIfv/X8lhKedsjXG7tPysKFsM4O+5c1og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pFq+pQYc6BCe2NtK7+Ig4Fdw+9S38KkYFXn8TIkEETbiabdtq0tgVHZ/k9Pw74Cqx PCf4+yC0vOzAjjqQrsEfJLtXDD9AgYzuRNQPSlXc2O+fJyET6GDcxzxobEXRbpeY3Y 5jVIIsyW/+qgVU+p/Ns2ZuirTc5iI7Zhou59OcVo= From: Krzysztof Kozlowski To: Michael Turquette , Stephen Boyd , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , David Lechner , Sekhar Nori , Santosh Shilimkar , Neil Armstrong , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , Andy Gross , Bjorn Andersson , Maxime Ripard , Chen-Yu Tsai , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 06/10] clk: keystone: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 17:03:44 +0200 Message-Id: <20200902150348.14465-6-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902150348.14465-1-krzk@kernel.org> References: <20200902150348.14465-1-krzk@kernel.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/keystone/syscon-clk.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c index 5b3d36462174..12ddcbed00e4 100644 --- a/drivers/clk/keystone/syscon-clk.c +++ b/drivers/clk/keystone/syscon-clk.c @@ -102,12 +102,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev) return -EINVAL; regmap = syscon_node_to_regmap(dev->of_node); - if (IS_ERR(regmap)) { - if (PTR_ERR(regmap) == -EPROBE_DEFER) - return -EPROBE_DEFER; - dev_err(dev, "failed to find parent regmap\n"); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(dev, PTR_ERR(regmap), + "failed to find parent regmap\n"); num_clks = 0; for (p = data; p->name; p++)