Commit a60294d2 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Greg Kroah-Hartman

drm/bridge/sii8620: fix resource acquisition error handling

In case of error during resource acquisition driver should print error
message only in case it is not deferred probe, using dev_err_probe helper
solves the issue. Moreover it records defer probe reason for debugging.
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20200713144324.23654-4-a.hajda@samsung.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d090b70e
...@@ -2299,10 +2299,9 @@ static int sii8620_probe(struct i2c_client *client, ...@@ -2299,10 +2299,9 @@ static int sii8620_probe(struct i2c_client *client,
INIT_LIST_HEAD(&ctx->mt_queue); INIT_LIST_HEAD(&ctx->mt_queue);
ctx->clk_xtal = devm_clk_get(dev, "xtal"); ctx->clk_xtal = devm_clk_get(dev, "xtal");
if (IS_ERR(ctx->clk_xtal)) { if (IS_ERR(ctx->clk_xtal))
dev_err(dev, "failed to get xtal clock from DT\n"); return dev_err_probe(dev, PTR_ERR(ctx->clk_xtal),
return PTR_ERR(ctx->clk_xtal); "failed to get xtal clock from DT\n");
}
if (!client->irq) { if (!client->irq) {
dev_err(dev, "no irq provided\n"); dev_err(dev, "no irq provided\n");
...@@ -2313,16 +2312,14 @@ static int sii8620_probe(struct i2c_client *client, ...@@ -2313,16 +2312,14 @@ static int sii8620_probe(struct i2c_client *client,
sii8620_irq_thread, sii8620_irq_thread,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT, IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
"sii8620", ctx); "sii8620", ctx);
if (ret < 0) { if (ret < 0)
dev_err(dev, "failed to install IRQ handler\n"); return dev_err_probe(dev, ret,
return ret; "failed to install IRQ handler\n");
}
ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); ctx->gpio_reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->gpio_reset)) { if (IS_ERR(ctx->gpio_reset))
dev_err(dev, "failed to get reset gpio from DT\n"); return dev_err_probe(dev, PTR_ERR(ctx->gpio_reset),
return PTR_ERR(ctx->gpio_reset); "failed to get reset gpio from DT\n");
}
ctx->supplies[0].supply = "cvcc10"; ctx->supplies[0].supply = "cvcc10";
ctx->supplies[1].supply = "iovcc18"; ctx->supplies[1].supply = "iovcc18";
......
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