From patchwork Wed Sep 2 19:36:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7DACE739 for ; Wed, 2 Sep 2020 19:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D13F20C56 for ; Wed, 2 Sep 2020 19:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075504; bh=lLhkPRvbTO/inodevltgwxchcR9zWQtrcdcrepSqhK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zmI6nJM+KaE1vj/SQjT18SCKZoC41HtRu6OckUb1YVylAnXi7Qz5lB0DdB+acL1pD IneKj76h3C4DdfzjZDJGcXSYi3fBMAr3yaOFlKMqs8IAQoDe6OPn01QAxiAi8Uj/17 yQJOs44xv/2h9zvBbGftEhEyzNXw5jEpBIqxzTdw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbgIBTiT (ORCPT ); Wed, 2 Sep 2020 15:38:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:44166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgIBTiR (ORCPT ); Wed, 2 Sep 2020 15:38:17 -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 A3A7920E65; Wed, 2 Sep 2020 19:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075497; bh=lLhkPRvbTO/inodevltgwxchcR9zWQtrcdcrepSqhK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yssYkjoh6faFQ/FjleguPOY6QVSDnvEP1PSVxRr/5m42aL34ZVKII5jaoYZfQ4Eis fbEKTuy6g4Lc0vLuIw3i41Hm5AXc7pw+6aCfL6P070XzUeDLd4IQBBI/G3ivFhsUL8 iHLJK5mFLNB9oqnzCNNc1kRRVeortgFfP8YH87Gs= From: Krzysztof Kozlowski To: Ulf Hansson , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Jaehoon Chung , Jun Nie , Shawn Guo , Paul Cercueil , Kevin Hilman , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , Al Cooper , Adrian Hunter , Michal Simek , Lars Povlsen , Steen Hegelund , Microchip Linux Driver Support , Thierry Reding , Jonathan Hunter , Arnd Bergmann , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 08/11] mmc: sdhci-tegra: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 21:36:55 +0200 Message-Id: <20200902193658.20539-9-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200902193658.20539-1-krzk@kernel.org> References: <20200902193658.20539-1-krzk@kernel.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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/mmc/host/sdhci-tegra.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 0a3f9d024f2a..118528f3325d 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1615,11 +1615,8 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk = devm_clk_get(mmc_dev(host->mmc), NULL); if (IS_ERR(clk)) { - rc = PTR_ERR(clk); - - if (rc != -EPROBE_DEFER) - dev_err(&pdev->dev, "failed to get clock: %d\n", rc); - + rc = dev_err_probe(&pdev->dev, PTR_ERR(clk), + "failed to get clock\n"); goto err_clk_get; } clk_prepare_enable(clk);