Commit 0f1b1b89 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones

mfd: wcd934x: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 41c9c06c
...@@ -219,12 +219,9 @@ static int wcd934x_slim_probe(struct slim_device *sdev) ...@@ -219,12 +219,9 @@ static int wcd934x_slim_probe(struct slim_device *sdev)
return -ENOMEM; return -ENOMEM;
ddata->irq = of_irq_get(np, 0); ddata->irq = of_irq_get(np, 0);
if (ddata->irq < 0) { if (ddata->irq < 0)
if (ddata->irq != -EPROBE_DEFER) return dev_err_probe(ddata->dev, ddata->irq,
dev_err(ddata->dev, "Failed to get IRQ: err = %d\n", "Failed to get IRQ\n");
ddata->irq);
return ddata->irq;
}
reset_gpio = of_get_named_gpio(np, "reset-gpios", 0); reset_gpio = of_get_named_gpio(np, "reset-gpios", 0);
if (reset_gpio < 0) { if (reset_gpio < 0) {
......
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