mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive
@ 2019-09-11 15:03 Marco Felsch
  2019-09-12  6:41 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2019-09-11 15:03 UTC (permalink / raw)
  To: barebox

If the current regulator can't be requested because of -EPROBE_DEFER we
shouldn't print a error and ignore it.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/mci/mci-core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 67257bcd18..9e39cbbb55 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1819,6 +1819,10 @@ int mci_register(struct mci_host *host)
 
 	host->supply = regulator_get(host->hw_dev, "vmmc");
 	if (IS_ERR(host->supply)) {
+		if (host->supply == ERR_PTR(-EPROBE_DEFER)) {
+			ret = -EPROBE_DEFER;
+			goto err_free;
+		}
 		dev_err(&mci->dev, "Failed to get 'vmmc' regulator.\n");
 		host->supply = NULL;
 	}
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive
  2019-09-11 15:03 [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive Marco Felsch
@ 2019-09-12  6:41 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-09-12  6:41 UTC (permalink / raw)
  To: Marco Felsch; +Cc: barebox

On Wed, Sep 11, 2019 at 05:03:03PM +0200, Marco Felsch wrote:
> If the current regulator can't be requested because of -EPROBE_DEFER we
> shouldn't print a error and ignore it.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  drivers/mci/mci-core.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-12  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 15:03 [PATCH] mci: core: make mci_register -EPROBE_DEFER sensitive Marco Felsch
2019-09-12  6:41 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox