mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
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>
This commit is contained in:
parent
ecfee9176b
commit
bc55630c65
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user