diff mbox series

[v2,4/9] drivers: thermal: tsens: Release device in success path

Message ID b8a2349eb80a4992d386b05fcde9a7a32bf9850b.1575349416.git.amit.kucheria@linaro.org (mailing list archive)
State Superseded
Headers show
Series thermal: tsens: Handle critical interrupts | expand

Commit Message

Amit Kucheria Dec. 3, 2019, 5:23 a.m. UTC
We don't currently call put_device in case of successfully initialising
the device.

Allow control to fall thru so we can use same code to put_device and
return error.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/qcom/tsens-common.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
index 1cbc5a6e5b4fd..e84e94a6f1a73 100644
--- a/drivers/thermal/qcom/tsens-common.c
+++ b/drivers/thermal/qcom/tsens-common.c
@@ -687,8 +687,6 @@  int __init init_common(struct tsens_priv *priv)
 	tsens_enable_irq(priv);
 	tsens_debug_init(op);
 
-	return 0;
-
 err_put_device:
 	put_device(&op->dev);
 	return ret;