All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: linux-arm-msm@vger.kernel.org
Cc: Rajendra Nayak <rnayak@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Rob Clark <robdclark@gmail.com>,
	stable@vger.kernel.org
Subject: [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init
Date: Fri, 30 Jun 2017 16:40:23 -0400	[thread overview]
Message-ID: <20170630204023.31712-1-robdclark@gmail.com> (raw)

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

             reply	other threads:[~2017-06-30 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 20:40 Rob Clark [this message]
2017-06-30 21:22 ` [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init Bjorn Andersson
2017-07-14  3:46 ` Rajendra Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170630204023.31712-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=rnayak@codeaurora.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.