All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	Fabrizio Castro <fabrizio.castro@bp.renesas.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH 04/11] mmc: meson-gx-mmc: catch all errors when getting regulators
Date: Sat,  7 Oct 2017 12:36:51 +0200	[thread overview]
Message-ID: <20171007103658.16868-5-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20171007103658.16868-1-wsa+renesas@sang-engineering.com>

Bail out everytime when mmc_regulator_get_supply() returns an errno, not only
when probing gets deferred. This is currently a no-op, because this function
only returns -EPROBE_DEFER or 0 right now. But if it will throw another error
somewhen, it will be for a reason. (This still doesn't change that getting
regulators is optional, so 0 can still mean no regulators found). So, let us a)
be future proof and b) have driver code which is easier to understand.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 85745ef179e22b..e0862d3f65b346 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1190,7 +1190,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
 	/* Get regulators and the supported OCR mask */
 	host->vqmmc_enabled = false;
 	ret = mmc_regulator_get_supply(mmc);
-	if (ret == -EPROBE_DEFER)
+	if (ret)
 		goto free_host;
 
 	ret = mmc_of_parse(mmc);
-- 
2.11.0

  parent reply	other threads:[~2017-10-07 10:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07 10:36 [PATCH 00/11] mmc: document mmc_regulator_get_supply and fix users Wolfram Sang
2017-10-07 10:36 ` [PATCH 01/11] mmc: add kerneldoc to mmc_regulator_get_supply() Wolfram Sang
2017-10-07 10:36 ` [PATCH 02/11] mmc: cavium: catch all errors when getting regulators Wolfram Sang
2017-10-07 10:36 ` [PATCH 03/11] mmc: dw_mmc: " Wolfram Sang
2017-10-07 10:36 ` Wolfram Sang [this message]
2017-10-07 10:36 ` [PATCH 05/11] mmc: meson-mx-sdio: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 06/11] mmc: mmci: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 07/11] mmc: mtk-sd: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 08/11] mmc: mxcmmc: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 09/11] mmc: omap_hsmmc: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 10/11] mmc: sdhci: " Wolfram Sang
2017-10-07 10:36 ` [PATCH 11/11] mmc: usdhi6rol0: " Wolfram Sang
2017-10-09 10:34 ` [PATCH 00/11] mmc: document mmc_regulator_get_supply and fix users Fabrizio Castro
2017-10-10  7:03 ` Ulf Hansson
2017-10-14 19:15   ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171007103658.16868-5-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=fabrizio.castro@bp.renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.