Linux-ide Archive on
 help / color / Atom feed
From: Sergey Shtylyov <>
To: Jens Axboe <>, <>
Subject: [PATCH] pata_rb532_cf: fix deferred probing
Date: Mon, 15 Mar 2021 14:46:53 +0300
Message-ID: <> (raw)

The driver overrides the error codes returned by platform_get_irq() to
-ENOENT, so if it returns -EPROBE_DEFER, the driver would fail the probe
permanently instead of the deferred probing. Switch to propagating the
error code upstream, still checking/overriding IRQ0 as libata regards it
as "no IRQ" (thus polling) anyway...

Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq")
Signed-off-by: Sergey Shtylyov <>

This patch is against the 'master' branch of Jens Axboe's 'linux-block.git'

drivers/ata/pata_rb532_cf.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-block/drivers/ata/pata_rb532_cf.c
--- linux-block.orig/drivers/ata/pata_rb532_cf.c
+++ linux-block/drivers/ata/pata_rb532_cf.c
@@ -115,10 +115,12 @@ static int rb532_pata_driver_probe(struc
 	irq = platform_get_irq(pdev, 0);
-	if (irq <= 0) {
+	if (irq < 0) {
 		dev_err(&pdev->dev, "no IRQ resource found\n");
-		return -ENOENT;
+		return irq;
+	if (!irq)
+		return -EINVAL;
 	gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_IN);
 	if (IS_ERR(gpiod)) {

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 11:46 Sergey Shtylyov [this message]
2021-05-18 18:32 ` Sergey Shtylyov
2021-05-18 21:18 ` Jens Axboe

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:

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

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ide Archive on

Archives are clonable:
	git clone --mirror linux-ide/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ide linux-ide/ \
	public-inbox-index linux-ide

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone