Skip to contentSkip to conversation

dmaengine: imx-sdma: return proper error if kzalloc fails

PATCH Applied Axel Lin 3 participants 3 messages Jul 12, 2011 – Jul 25, 2011

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 dmaengine: imx-sdma: return proper error if kzalloc fails

---
 drivers/dma/imx-sdma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/dma/imx-sdma.c +3 -1
index 1ea47db..f96d038 100644
@@ -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;
 
Signature · 1 line
1.7.4.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin
---
 drivers/dma/imx-sdma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Quoted 23 lines
drivers/dma/imx-sdma.c +3 -1
index 1ea47db..f96d038 100644
@@ -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;
 
Signature · 1 line
1.7.4.1
Signature · 4 lines
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 |
Applied
#2 lore raw
Quoted 7 lines · Sascha Hauer
Quoted 4 lines · Axel Lin
---
 drivers/dma/imx-sdma.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Applied, Thanks

Quoted 25 lines
Quoted 24 lines
drivers/dma/imx-sdma.c +3 -1
index 1ea47db..f96d038 100644
@@ -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;
 
Signature · 1 line
1.7.4.1
Signature · 2 lines
~Vinod Koul
Intel Corp.