Skip to content

Commit

Permalink
regulator: gpio: don't print error on EPROBE_DEFER
Browse files Browse the repository at this point in the history
Don't print out an error with the driver sees EPROBE_DEFER when
attempting to get the gpio.  These errors are usually transient; the
probe will be retried later.

Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Rabin Vincent authored and Mark Brown committed Feb 20, 2016
1 parent 92e963f commit 0258382
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/regulator/gpio-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ static int gpio_regulator_probe(struct platform_device *pdev)
drvdata->nr_gpios = config->nr_gpios;
ret = gpio_request_array(drvdata->gpios, drvdata->nr_gpios);
if (ret) {
dev_err(&pdev->dev,
"Could not obtain regulator setting GPIOs: %d\n", ret);
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"Could not obtain regulator setting GPIOs: %d\n",
ret);
goto err_memstate;
}
}
Expand Down

0 comments on commit 0258382

Please sign in to comment.