All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails
@ 2011-07-12 13:00 Axel Lin
  2011-07-12 13:51 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2011-07-12 13:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sascha Hauer, Dan Williams, Vinod Koul

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/dma/imx-sdma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 1ea47db..f96d038 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1281,8 +1281,10 @@ static int __init sdma_probe(struct platform_device *pdev)
 		goto err_request_irq;
 
 	sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
-	if (!sdma->script_addrs)
+	if (!sdma->script_addrs) {
+		ret = -ENOMEM;
 		goto err_alloc;
+	}
 
 	sdma->version = pdata->sdma_version;
 
-- 
1.7.4.1




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

* Re: [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails
  2011-07-12 13:00 [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails Axel Lin
@ 2011-07-12 13:51 ` Sascha Hauer
  2011-07-25 14:24   ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2011-07-12 13:51 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Dan Williams, Vinod Koul

On Tue, Jul 12, 2011 at 09:00:13PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/dma/imx-sdma.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 1ea47db..f96d038 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -1281,8 +1281,10 @@ static int __init sdma_probe(struct platform_device *pdev)
>  		goto err_request_irq;
>  
>  	sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
> -	if (!sdma->script_addrs)
> +	if (!sdma->script_addrs) {
> +		ret = -ENOMEM;
>  		goto err_alloc;
> +	}
>  
>  	sdma->version = pdata->sdma_version;
>  
> -- 
> 1.7.4.1
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails
  2011-07-12 13:51 ` Sascha Hauer
@ 2011-07-25 14:24   ` Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2011-07-25 14:24 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: vinod.koul, Axel Lin, linux-kernel, Dan Williams

On Tue, 2011-07-12 at 15:51 +0200, Sascha Hauer wrote:
> On Tue, Jul 12, 2011 at 09:00:13PM +0800, Axel Lin wrote:
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> > ---
> >  drivers/dma/imx-sdma.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Applied, Thanks

> 
> > 
> > diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> > index 1ea47db..f96d038 100644
> > --- a/drivers/dma/imx-sdma.c
> > +++ b/drivers/dma/imx-sdma.c
> > @@ -1281,8 +1281,10 @@ static int __init sdma_probe(struct platform_device *pdev)
> >  		goto err_request_irq;
> >  
> >  	sdma->script_addrs = kzalloc(sizeof(*sdma->script_addrs), GFP_KERNEL);
> > -	if (!sdma->script_addrs)
> > +	if (!sdma->script_addrs) {
> > +		ret = -ENOMEM;
> >  		goto err_alloc;
> > +	}
> >  
> >  	sdma->version = pdata->sdma_version;
> >  
> > -- 
> > 1.7.4.1
> > 
> > 
> > 
> > 
> 

-- 
~Vinod Koul
Intel Corp.


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

end of thread, other threads:[~2011-07-25 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 13:00 [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails Axel Lin
2011-07-12 13:51 ` Sascha Hauer
2011-07-25 14:24   ` Vinod Koul

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.