Skip to content

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 <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
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)