Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
To: Adam Xue <zxue@semtech.com>,
	mani@kernel.org, jeff.hugo@oss.qualcomm.com,
	quic_yabdulra@quicinc.com, chentao@kylinos.cn,
	quic_mattleun@quicinc.com, mhi@lists.linux.dev,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: imocanu@semtech.com
Subject: Re: [PATCH v3] Fix potential kernel panic by calling dev_err
Date: Fri, 5 Sep 2025 11:14:31 +0530	[thread overview]
Message-ID: <e825026d-f365-4e95-bb1f-3eec5f0a8305@oss.qualcomm.com> (raw)
In-Reply-To: <20250904183405.32986-1-zxue@semtech.com>



On 9/5/2025 12:04 AM, Adam Xue wrote:
> In mhi_init_irq_setup, the device pointer used for dev_err was not initialized.
>   Use the pointer from mhi_cntrl instead.
> 
Don't we need fixes tag.
> Signed-off-by: Adam Xue <zxue@semtech.com>
Reviewed-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> ---
>   drivers/bus/mhi/host/init.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c
> index 7f72aab38ce9..099be8dd1900 100644
> --- a/drivers/bus/mhi/host/init.c
> +++ b/drivers/bus/mhi/host/init.c
> @@ -194,7 +194,6 @@ static void mhi_deinit_free_irq(struct mhi_controller *mhi_cntrl)
>   static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>   {
>   	struct mhi_event *mhi_event = mhi_cntrl->mhi_event;
> -	struct device *dev = &mhi_cntrl->mhi_dev->dev;
>   	unsigned long irq_flags = IRQF_SHARED | IRQF_NO_SUSPEND;
>   	int i, ret;
>   
> @@ -221,7 +220,7 @@ static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>   			continue;
>   
>   		if (mhi_event->irq >= mhi_cntrl->nr_irqs) {
> -			dev_err(dev, "irq %d not available for event ring\n",
> +			dev_err(mhi_cntrl->cntrl_dev, "irq %d not available for event ring\n",
>   				mhi_event->irq);
>   			ret = -EINVAL;
>   			goto error_request;
> @@ -232,7 +231,7 @@ static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>   				  irq_flags,
>   				  "mhi", mhi_event);
>   		if (ret) {
> -			dev_err(dev, "Error requesting irq:%d for ev:%d\n",
> +			dev_err(mhi_cntrl->cntrl_dev, "Error requesting irq:%d for ev:%d\n",
>   				mhi_cntrl->irq[mhi_event->irq], i);
>   			goto error_request;
>   		}

  reply	other threads:[~2025-09-05  5:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 18:34 [PATCH v3] Fix potential kernel panic by calling dev_err Adam Xue
2025-09-05  5:44 ` Krishna Chaitanya Chundru [this message]
2025-09-05 16:45 ` Manivannan Sadhasivam
2025-09-05 17:19   ` Adam Xue
2025-09-05 17:30     ` Manivannan Sadhasivam

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=e825026d-f365-4e95-bb1f-3eec5f0a8305@oss.qualcomm.com \
    --to=krishna.chundru@oss.qualcomm.com \
    --cc=chentao@kylinos.cn \
    --cc=imocanu@semtech.com \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mhi@lists.linux.dev \
    --cc=quic_mattleun@quicinc.com \
    --cc=quic_yabdulra@quicinc.com \
    --cc=zxue@semtech.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox