diff options
author | Chris Packham <chris.packham@alliedtelesis.co.nz> | 2019-10-30 09:17:26 +1300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-12-18 16:10:08 +0100 |
commit | b0d0d3de246b1eda0b3050745848e78bbb15626b (patch) | |
tree | 3c9beb8545b65c53ce11ac87a83419f31bccf540 /drivers/power/reset | |
parent | e42617b825f8073569da76dc4510bfa019b1c35a (diff) |
power: reset: gpio-restart: don't error on deferral
Don't generate an error message when devm_gpiod_get fails with
-EPROBE_DEFER.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/reset')
-rw-r--r-- | drivers/power/reset/gpio-restart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/power/reset/gpio-restart.c b/drivers/power/reset/gpio-restart.c index 308ca9d9d276..5466eeea261c 100644 --- a/drivers/power/reset/gpio-restart.c +++ b/drivers/power/reset/gpio-restart.c @@ -64,9 +64,11 @@ static int gpio_restart_probe(struct platform_device *pdev) gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL, open_source ? GPIOD_IN : GPIOD_OUT_LOW); - if (IS_ERR(gpio_restart->reset_gpio)) { - dev_err(&pdev->dev, "Could not get reset GPIO\n"); - return PTR_ERR(gpio_restart->reset_gpio); + ret = PTR_ERR_OR_ZERO(gpio_restart->reset_gpio); + if (ret) { + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "Could not get reset GPIO\n"); + return ret; } gpio_restart->restart_handler.notifier_call = gpio_restart_notify; |