linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org,
	CPGS <cpgs@samsung.com>
Subject: Re: [patch] mmc: dw_mmc: NULL dereference in error message
Date: Fri, 23 Oct 2015 09:58:07 +0900	[thread overview]
Message-ID: <5629861F.2060905@samsung.com> (raw)
In-Reply-To: <20151022195346.GD24439@mwanda>

Hi,

Thanks for pointing out.
I will pick this patch at my repository.

Best Regards,
Jaehoon Chung

On 10/23/2015 04:53 AM, Dan Carpenter wrote:
> The "host->dms->ch" pointer is NULL here so we can't use it to print the
> error message.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 6e600e8..f877b2c 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -752,9 +752,7 @@ static int dw_mci_edmac_init(struct dw_mci *host)
>  
>  	host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx");
>  	if (!host->dms->ch) {
> -		dev_err(host->dev,
> -			"Failed to get external DMA channel %d\n",
> -			host->dms->ch->chan_id);
> +		dev_err(host->dev, "Failed to get external DMA channel.\n");
>  		kfree(host->dms);
>  		host->dms = NULL;
>  		return -ENXIO;
> 


      reply	other threads:[~2015-10-23  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 19:53 [patch] mmc: dw_mmc: NULL dereference in error message Dan Carpenter
2015-10-23  0:58 ` Jaehoon Chung [this message]

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=5629861F.2060905@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).