Revert "i2c: xiic: Simplify with dev_err_probe()"
This reverts commit b8ab3cd966
.
This commit is contained in:
parent
4a9666c457
commit
9411ef0547
1 changed files with 5 additions and 4 deletions
|
@ -838,10 +838,11 @@ static int xiic_i2c_probe(struct platform_device *pdev)
|
|||
mutex_init(&i2c->lock);
|
||||
|
||||
i2c->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(i2c->clk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(i2c->clk),
|
||||
"input clock not found.\n");
|
||||
|
||||
if (IS_ERR(i2c->clk)) {
|
||||
if (PTR_ERR(i2c->clk) != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "input clock not found.\n");
|
||||
return PTR_ERR(i2c->clk);
|
||||
}
|
||||
ret = clk_prepare_enable(i2c->clk);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Unable to enable clock.\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue