public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init
@ 2017-06-30 20:40 Rob Clark
  2017-06-30 21:22 ` Bjorn Andersson
  2017-07-14  3:46 ` Rajendra Nayak
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Clark @ 2017-06-30 20:40 UTC (permalink / raw)
  To: linux-arm-msm; +Cc: Rajendra Nayak, Bjorn Andersson, Rob Clark, stable

init_common() is called from probe, which can happen after the __init
section is already unloaded in the case of -EPROBE_DEFER.  Causing a
later probe to attempt to branch to hyperspace.

Cc: <stable@vger.kernel.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/thermal/qcom/tsens-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
index b1449ad..22ad37c 100644
--- a/drivers/thermal/qcom/tsens-common.c
+++ b/drivers/thermal/qcom/tsens-common.c
@@ -123,7 +123,7 @@ static const struct regmap_config tsens_config = {
 	.reg_stride	= 4,
 };
 
-int __init init_common(struct tsens_device *tmdev)
+int init_common(struct tsens_device *tmdev)
 {
 	void __iomem *base;
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-14  3:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 20:40 [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init Rob Clark
2017-06-30 21:22 ` Bjorn Andersson
2017-07-14  3:46 ` Rajendra Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox