All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <robert.hancock@calian.com>
To: linux-kernel@vger.kernel.org
Cc: giometti@enneenne.com, gregkh@linuxfoundation.org,
	andriy.shevchenko@linux.intel.com, rasm@fe.up.pt,
	jamesnuss@nanometrics.ca, akpm@linux-foundation.org,
	Robert Hancock <robert.hancock@calian.com>
Subject: [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe
Date: Wed, 12 Jan 2022 14:52:14 -0600	[thread overview]
Message-ID: <20220112205214.2060954-1-robert.hancock@calian.com> (raw)

If the pps-gpio driver was probed prior to the GPIO device it uses, the
devm_gpiod_get call returned an -EPROBE_DEFER error, but pps_gpio_probe
replaced that error code with -EINVAL, causing the pps-gpio probe to
fail and not be retried later. Propagate the error return value so that
deferred probe works properly.

Fixes: 161520451dfa (pps: new client driver using GPIO)
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
---
 drivers/pps/clients/pps-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 35799e6401c9..2f4b11b4dfcd 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -169,7 +169,7 @@ static int pps_gpio_probe(struct platform_device *pdev)
 	/* GPIO setup */
 	ret = pps_gpio_setup(dev);
 	if (ret)
-		return -EINVAL;
+		return ret;
 
 	/* IRQ setup */
 	ret = gpiod_to_irq(data->gpio_pin);
-- 
2.31.1


             reply	other threads:[~2022-01-12 20:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 20:52 Robert Hancock [this message]
2022-01-12 21:07 ` [PATCH] pps: clients: gpio: Propagate return value from pps_gpio_probe Andy Shevchenko
2022-01-13  8:17   ` Rodolfo Giometti
2022-01-29 22:02     ` Robert Hancock
2022-01-30  9:35       ` Rodolfo Giometti
2022-02-02 17:04         ` Robert Hancock
2022-02-02 17:40           ` Rodolfo Giometti
2022-02-04 14:34           ` gregkh

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=20220112205214.2060954-1-robert.hancock@calian.com \
    --to=robert.hancock@calian.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=giometti@enneenne.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jamesnuss@nanometrics.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rasm@fe.up.pt \
    /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.