From patchwork Wed Sep 2 19:36:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 256347 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=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 5F134C433E2 for ; Wed, 2 Sep 2020 19:37:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36BF52083B for ; Wed, 2 Sep 2020 19:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075467; bh=3jmDh8QNl4AkOfJkIVlRj8d+A0jP4cB3a3M/pXBDmoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ADVJCi+gi3drmtYnULuSrEpK1ny0kwf2HSUNvL4cNnWe0ZUg9fw9esUXIAXQafAqF 3Xe1cDhWkRFwsAg1AJ3foD5fgncIqfMGC6PPEDeTc7LQucAaHCFHr07H3yxnXzfFuK TfaifEOI422X/J0rRBfZfyLF41HhZrYlEzyh/L8E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727107AbgIBThq (ORCPT ); Wed, 2 Sep 2020 15:37:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:43018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726140AbgIBThp (ORCPT ); Wed, 2 Sep 2020 15:37:45 -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 2233D20C56; Wed, 2 Sep 2020 19:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599075464; bh=3jmDh8QNl4AkOfJkIVlRj8d+A0jP4cB3a3M/pXBDmoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KwI41zpNVr5ixYFE24NkZpN8aKVGOkORUon3rQ/ZiykJ4JGyJ15oaoymUBYWmp9dN lv4NteL/7hKvndYjbYBMG62Sswv7J3vaFZLvr08v+ml+G18oXFQo7Qx+Z9qwoWzjfc ci/X7gis38Zo3T3uF1b/GjesZLiFe/Oug4b9W1SE= 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 04/11] mmc: jz4740: Simplify with dev_err_probe() Date: Wed, 2 Sep 2020 21:36:51 +0200 Message-Id: <20200902193658.20539-5-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/jz4740_mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 81d71010b474..0c5b52b53303 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -991,9 +991,8 @@ static int jz4740_mmc_probe(struct platform_device* pdev) ret = mmc_of_parse(mmc); if (ret) { - if (ret != -EPROBE_DEFER) - dev_err(&pdev->dev, - "could not parse device properties: %d\n", ret); + dev_err_probe(&pdev->dev, ret, + "could not parse device properties\n"); goto err_free_host; }