linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Chris Ball <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Jarkko Lavinen <j.lavinen@samsung.com>
Subject: Re: [PATCH] mmc: omap: Fix error introduced by fix to release_mem_region() path
Date: Wed, 4 Dec 2013 10:01:56 -0800	[thread overview]
Message-ID: <20131204180154.GT26766@atomide.com> (raw)
In-Reply-To: <20131202193459.GL26766@atomide.com>

* Tony Lindgren <tony@atomide.com> [131202 11:36]:
> Commit 31ee9181eb92: (mmc: omap: Fix DMA configuration to not rely
> on device id) fixed getting of the DMA resources when booted with
> device tree. This patch however changed the handling of the
> free_mem_region() error path by reusing the struct resource *res
> for the DMA resources.
> 
> Fix the error the same way omap_hsmmc.c driver handles it, which
> is to restore the resource before using the values to call
> release_mem_region().
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> ---
> 
> Chris, looks like the patch introducing this error is queued in
> arm-soc fixes branch.. Care to ack this one too and I'll merge it
> via arm-soc as well?
> 
> After that, no need for me to patch this driver for my mach-omap2
> device tree conversion I hope :)

OK the previous fixes just hit the mainline, no need for me to
queue this any longer. Please feel free to pick this one up for
the -rc cycle.

Regards,

Tony
 
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -1465,7 +1465,10 @@ err_free_mmc_host:
>  err_ioremap:
>  	kfree(host);
>  err_free_mem_region:
> -	release_mem_region(res->start, resource_size(res));
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (res)
> +		release_mem_region(res->start, resource_size(res));
> +
>  	return ret;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-12-04 18:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02 19:34 [PATCH] mmc: omap: Fix error introduced by fix to release_mem_region() path Tony Lindgren
2013-12-03 18:16 ` Jarkko Nikula
2013-12-04 18:00   ` Tony Lindgren
2013-12-04 18:01 ` Tony Lindgren [this message]
2013-12-04 21:14 ` [PATCH 0/7] mmc: omap: Fixes, cleanup and add ERASE capability Jarkko Nikula
2013-12-04 21:14   ` [PATCH 1/7] mmc: omap: Fix NULL pointer dereference due uninitialized cover_tasklet Jarkko Nikula
2013-12-04 21:14   ` [PATCH 2/7] mmc: omap: Convert to devm_kzalloc Jarkko Nikula
2013-12-04 21:14   ` [PATCH 3/7] mmc: omap: Remove duplicate host->irq assignment Jarkko Nikula
2013-12-04 21:14   ` [PATCH 4/7] mmc: omap: Remove mem_res field from struct mmc_omap_host Jarkko Nikula
2013-12-04 21:14   ` [PATCH 5/7] mmc: omap: Convert to devm_ioremap_resource Jarkko Nikula
2013-12-04 21:14   ` [PATCH 6/7] mmc: omap: Remove always set use_dma flag from struct mmc_omap_host Jarkko Nikula
2013-12-04 21:14   ` [PATCH 7/7] mmc: omap: Add erase capability Jarkko Nikula
2013-12-05 18:18   ` [PATCH 0/7] mmc: omap: Fixes, cleanup and add ERASE capability Tony Lindgren
2013-12-06 13:41   ` Aaro Koskinen
2013-12-06 19:54     ` Jarkko Nikula

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=20131204180154.GT26766@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=cjb@laptop.org \
    --cc=dan.carpenter@oracle.com \
    --cc=j.lavinen@samsung.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@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 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).