Commit b0d0d3de authored by Chris Packham's avatar Chris Packham Committed by Sebastian Reichel

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: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent e42617b8
...@@ -64,9 +64,11 @@ static int gpio_restart_probe(struct platform_device *pdev) ...@@ -64,9 +64,11 @@ static int gpio_restart_probe(struct platform_device *pdev)
gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL, gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL,
open_source ? GPIOD_IN : GPIOD_OUT_LOW); open_source ? GPIOD_IN : GPIOD_OUT_LOW);
if (IS_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"); dev_err(&pdev->dev, "Could not get reset GPIO\n");
return PTR_ERR(gpio_restart->reset_gpio); return ret;
} }
gpio_restart->restart_handler.notifier_call = gpio_restart_notify; gpio_restart->restart_handler.notifier_call = gpio_restart_notify;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment