Jeremy Cline 186cf00
From cadf6ce5a3929b42b0e63fe36d0c08bf6b59f25e Mon Sep 17 00:00:00 2001
aa18062
From: Rob Clark <robdclark@gmail.com>
aa18062
Date: Fri, 30 Jun 2017 16:40:23 -0400
Jeremy Cline 186cf00
Subject: [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init
aa18062
aa18062
init_common() is called from probe, which can happen after the __init
aa18062
section is already unloaded in the case of -EPROBE_DEFER.  Causing a
aa18062
later probe to attempt to branch to hyperspace.
aa18062
aa18062
Cc: <stable@vger.kernel.org>
aa18062
Signed-off-by: Rob Clark <robdclark@gmail.com>
aa18062
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
aa18062
---
aa18062
 drivers/thermal/qcom/tsens-common.c | 2 +-
aa18062
 1 file changed, 1 insertion(+), 1 deletion(-)
aa18062
aa18062
diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
Jeremy Cline 186cf00
index 6207d8d92351..920167c6eac5 100644
aa18062
--- a/drivers/thermal/qcom/tsens-common.c
aa18062
+++ b/drivers/thermal/qcom/tsens-common.c
Jeremy Cline 186cf00
@@ -124,7 +124,7 @@ static const struct regmap_config tsens_config = {
aa18062
 	.reg_stride	= 4,
aa18062
 };
aa18062
 
aa18062
-int __init init_common(struct tsens_device *tmdev)
aa18062
+int init_common(struct tsens_device *tmdev)
aa18062
 {
4eb72d3
 	void __iomem *tm_base, *srot_base;
Jeremy Cline 186cf00
 	struct resource *res;
aa18062
-- 
Jeremy Cline 186cf00
2.17.1
Jeremy Cline 186cf00