From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f44.google.com ([74.125.83.44]:33671 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753016AbdF3VWe (ORCPT ); Fri, 30 Jun 2017 17:22:34 -0400 Received: by mail-pg0-f44.google.com with SMTP id f127so68973145pgc.0 for ; Fri, 30 Jun 2017 14:22:34 -0700 (PDT) Date: Fri, 30 Jun 2017 14:22:24 -0700 From: Bjorn Andersson To: Rob Clark Cc: linux-arm-msm@vger.kernel.org, Rajendra Nayak , stable@vger.kernel.org Subject: Re: [PATCH] thermal: qcom: tsens: fix crash due to incorrect __init Message-ID: <20170630212224.GF18666@tuxbook> References: <20170630204023.31712-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630204023.31712-1-robdclark@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: On Fri 30 Jun 13:40 PDT 2017, Rob Clark wrote: > 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: > Signed-off-by: Rob Clark Acked-by: Bjorn Andersson Regards, Bjorn > --- > 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 >