diff options
author | Robert Hancock <robert.hancock@calian.com> | 2022-01-12 14:52:14 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-04 15:33:42 +0100 |
commit | abaca3179b41d4b3b115f27814ee36f6fb45e897 (patch) | |
tree | b46ec8d589b694cefe83cdcdf8162b807df99a0d | |
parent | a74e7263b53424a7f5b999a11d610231338f5b99 (diff) | |
download | linux-abaca3179b41d4b3b115f27814ee36f6fb45e897.tar.gz linux-abaca3179b41d4b3b115f27814ee36f6fb45e897.tar.bz2 linux-abaca3179b41d4b3b115f27814ee36f6fb45e897.zip |
pps: clients: gpio: Propagate return value from pps_gpio_probe
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)
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Signed-off-by: Rodolfo Giometti <giometti@enneenne.com>
Link: https://lore.kernel.org/r/20220112205214.2060954-1-robert.hancock@calian.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/pps/clients/pps-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |