Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit bc55630

Browse files
krzkdlezcano
authored andcommitted
thermal/drivers/qcom-tsens: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-10-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
1 parent ecfee91 commit bc55630

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/thermal/qcom/tsens.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,11 +1336,9 @@ static int tsens_probe(struct platform_device *pdev)
13361336

13371337
if (priv->ops->calibrate) {
13381338
ret = priv->ops->calibrate(priv);
1339-
if (ret < 0) {
1340-
if (ret != -EPROBE_DEFER)
1341-
dev_err(dev, "%s: calibration failed\n", __func__);
1342-
return ret;
1343-
}
1339+
if (ret < 0)
1340+
return dev_err_probe(dev, ret, "%s: calibration failed\n",
1341+
__func__);
13441342
}
13451343

13461344
ret = tsens_register(priv);

0 commit comments

Comments
 (0)