lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110712135128.GV6069@pengutronix.de>
Date:	Tue, 12 Jul 2011 15:51:28 +0200
From:	Sascha Hauer <s.hauer@...gutronix.de>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Dan Williams <dan.j.williams@...el.com>,
	Vinod Koul <vinod.koul@...el.com>
Subject: Re: [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails

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

Acked-by: Sascha Hauer <s.hauer@...gutronix.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 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ