Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Brian Norris" <computersforpeace@gmail.com>,
	"Kamal Dasu" <kamal.dasu@broadcom.com>,
	linux-mtd@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up
Date: Wed, 19 Jul 2023 10:24:38 +0200	[thread overview]
Message-ID: <20230719102438.73f8f353@xps-13> (raw)
In-Reply-To: <20230718163331.9116-1-zajec5@gmail.com>

Hi Rafał,

zajec5@gmail.com wrote on Tue, 18 Jul 2023 18:33:31 +0200:

> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MTD subsystem may return -EPROBE_DEFER if something isn't ready yet.
> It's important to pass that error up so device will get probed later.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> index 39661e23d7d4..cca2b153ae26 100644
> --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> @@ -3245,6 +3245,8 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
>  
>  			ret = brcmnand_init_cs(host, NULL);
>  			if (ret) {
> +				if (ret == -EPROBE_DEFER)
> +					goto err;

Don't we need an of_node_put(child) here?

>  				devm_kfree(dev, host);
>  				continue; /* Try all chip-selects */
>  			}


Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2023-07-19  8:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18 16:33 [PATCH] mtd: rawnand: brcmnand: propagate init error -EPROBE_DEFER up Rafał Miłecki
2023-07-19  8:24 ` Miquel Raynal [this message]
2023-07-19  8:38   ` Rafał Miłecki

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=20230719102438.73f8f353@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=kamal.dasu@broadcom.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=zajec5@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox