Commit 43f83cd0 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Wolfram Sang

i2c: mux: reg: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 432d159a
...@@ -171,13 +171,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev) ...@@ -171,13 +171,9 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
sizeof(mux->data)); sizeof(mux->data));
} else { } else {
ret = i2c_mux_reg_probe_dt(mux, pdev); ret = i2c_mux_reg_probe_dt(mux, pdev);
if (ret == -EPROBE_DEFER) if (ret < 0)
return ret; return dev_err_probe(&pdev->dev, ret,
"Error parsing device tree");
if (ret < 0) {
dev_err(&pdev->dev, "Error parsing device tree");
return ret;
}
} }
parent = i2c_get_adapter(mux->data.parent); parent = i2c_get_adapter(mux->data.parent);
......
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