Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chris Packham and committed by
Sebastian Reichel
b0d0d3de e42617b8

+5 -3
+5 -3
drivers/power/reset/gpio-restart.c
··· 64 64 65 65 gpio_restart->reset_gpio = devm_gpiod_get(&pdev->dev, NULL, 66 66 open_source ? GPIOD_IN : GPIOD_OUT_LOW); 67 - if (IS_ERR(gpio_restart->reset_gpio)) { 68 - dev_err(&pdev->dev, "Could not get reset GPIO\n"); 69 - return PTR_ERR(gpio_restart->reset_gpio); 67 + ret = PTR_ERR_OR_ZERO(gpio_restart->reset_gpio); 68 + if (ret) { 69 + if (ret != -EPROBE_DEFER) 70 + dev_err(&pdev->dev, "Could not get reset GPIO\n"); 71 + return ret; 70 72 } 71 73 72 74 gpio_restart->restart_handler.notifier_call = gpio_restart_notify;