summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-07-09 15:59:40 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2024-07-15 14:31:41 +0300
commitbc55630c657a7f81e65b6993e8113f453cdcef4b (patch)
tree1f046f00d8657cafa1771d34c14bdbf9b9fe53fd /drivers/thermal
parentecfee9176b8fd68178a9682fc7285054266012ef (diff)
downloadlinux-bc55630c657a7f81e65b6993e8113f453cdcef4b.tar.xz
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/qcom/tsens.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index e76e23026dc8..0b4421bf4785 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1336,11 +1336,9 @@ static int tsens_probe(struct platform_device *pdev)
if (priv->ops->calibrate) {
ret = priv->ops->calibrate(priv);
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "%s: calibration failed\n", __func__);
- return ret;
- }
+ if (ret < 0)
+ return dev_err_probe(dev, ret, "%s: calibration failed\n",
+ __func__);
}
ret = tsens_register(priv);