From patchwork Wed Sep 2 19:36:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 11751607 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 8C1B5109B for ; Wed, 2 Sep 2020 19:37:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A15C2083B for ; Wed, 2 Sep 2020 19:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075446; bh=QI1dbgDJjoYYCfP5Ig/mRza3CKsYxoxxWzwXZDaG6PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fRCdXv0PUwOrbSKEEL6HQei49dOG4l6HNNceed+PAw0LjUC89D1UWMeBYJiNjFZJV bcb6Qvb1k0RGwquNdQXcxp78Ef/qZfQaTZUfTAHe44GQMGAMs87jwQnl67wT8pCVZk FAkfibpnZ5xY2vcuaBfziZ2w2qxy/QCXRK6zSuV4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbgIBThX (ORCPT ); Wed, 2 Sep 2020 15:37:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:42360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgIBThX (ORCPT ); Wed, 2 Sep 2020 15:37:23 -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 D97F620C56; Wed, 2 Sep 2020 19:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075442; bh=QI1dbgDJjoYYCfP5Ig/mRza3CKsYxoxxWzwXZDaG6PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AphxV8QEPolpObOxM6UHjrZjADaAg1btgTTHrvzO2dWIADsBTTqpuMWAL4i370o7v 4p9el5oYjDyJ+MbJEwURiHc7zp8MMUlNuPfYUBojB3mCF8mIcvTL88iitSV6+7veqF PcmNdGmheaZlQtHy9Nuvsk99SoqL4pFsrHLfZamU= 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 01/11] mmc: bcm2835: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 21:36:48 +0200 Message-Id: <20200902193658.20539-2-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 Acked-by: Florian Fainelli --- drivers/mmc/host/bcm2835.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index a0767790a826..35320bc9dc02 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1406,9 +1406,7 @@ static int bcm2835_probe(struct platform_device *pdev) clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) { - ret = PTR_ERR(clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "could not get clk: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(clk), "could not get clk\n"); goto err; }