All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false
@ 2012-06-14 17:31 Jonathan Kliegman
  2012-06-15  7:25 ` Jaehoon Chung
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Kliegman @ 2012-06-14 17:31 UTC (permalink / raw)
  To: linux-mmc; +Cc: Jonathan Kliegman

host->dma_ops is not valid if host->usa dma is 0 so protect
host->dma_ops reference in dw_mci_resume

Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
---
 drivers/mmc/host/dw_mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 1ca5e72..e2758d5 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2175,7 +2175,7 @@ int dw_mci_resume(struct dw_mci *host)
 		return ret;
 	}
 
-	if (host->dma_ops->init)
+	if (host->use_dma && host->dma_ops->init)
 		host->dma_ops->init(host);
 
 	/* Restore the old value at FIFOTH register */
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false
  2012-06-14 17:31 [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false Jonathan Kliegman
@ 2012-06-15  7:25 ` Jaehoon Chung
  2012-06-15 13:14   ` Will Newton
  0 siblings, 1 reply; 4+ messages in thread
From: Jaehoon Chung @ 2012-06-15  7:25 UTC (permalink / raw)
  To: Jonathan Kliegman; +Cc: linux-mmc, Chris Ball, Will Newton, James Hogan

It looks good to me.

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

On 06/15/2012 02:31 AM, Jonathan Kliegman wrote:

> host->dma_ops is not valid if host->usa dma is 0 so protect
> host->dma_ops reference in dw_mci_resume
> 
> Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
> ---
>  drivers/mmc/host/dw_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 1ca5e72..e2758d5 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -2175,7 +2175,7 @@ int dw_mci_resume(struct dw_mci *host)
>  		return ret;
>  	}
>  
> -	if (host->dma_ops->init)
> +	if (host->use_dma && host->dma_ops->init)
>  		host->dma_ops->init(host);
>  
>  	/* Restore the old value at FIFOTH register */



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false
  2012-06-15  7:25 ` Jaehoon Chung
@ 2012-06-15 13:14   ` Will Newton
  2012-06-20  6:34     ` Chris Ball
  0 siblings, 1 reply; 4+ messages in thread
From: Will Newton @ 2012-06-15 13:14 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: Jonathan Kliegman, linux-mmc, Chris Ball, Will Newton, James Hogan

On Fri, Jun 15, 2012 at 8:25 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> It looks good to me.
>
> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
>
> On 06/15/2012 02:31 AM, Jonathan Kliegman wrote:
>
>> host->dma_ops is not valid if host->usa dma is 0 so protect
>> host->dma_ops reference in dw_mci_resume
>>
>> Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>

Yes, looks good to me too.

Acked-by: Will Newton <will.newton@imgtec.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false
  2012-06-15 13:14   ` Will Newton
@ 2012-06-20  6:34     ` Chris Ball
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2012-06-20  6:34 UTC (permalink / raw)
  To: Will Newton
  Cc: Jaehoon Chung, Jonathan Kliegman, linux-mmc, Will Newton, James Hogan

Hi,

On Fri, Jun 15 2012, Will Newton wrote:
> On Fri, Jun 15, 2012 at 8:25 AM, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> It looks good to me.
>>
>> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
>>
>> On 06/15/2012 02:31 AM, Jonathan Kliegman wrote:
>>
>>> host->dma_ops is not valid if host->usa dma is 0 so protect
>>> host->dma_ops reference in dw_mci_resume
>>>
>>> Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
>
> Yes, looks good to me too.
>
> Acked-by: Will Newton <will.newton@imgtec.com>

Thanks, pushed to mmc-next for 3.6.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-20  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 17:31 [PATCH] mmc: dw_mmc: Fix null dma_ops access when use_dma is false Jonathan Kliegman
2012-06-15  7:25 ` Jaehoon Chung
2012-06-15 13:14   ` Will Newton
2012-06-20  6:34     ` Chris Ball

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.