From: Sascha Hauer <s.hauer@pengutronix.de>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vinod.koul@intel.com>
Subject: Re: [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails
Date: Tue, 12 Jul 2011 15:51:28 +0200 [thread overview]
Message-ID: <20110712135128.GV6069@pengutronix.de> (raw)
In-Reply-To: <1310475613.2618.0.camel@phoenix>
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 |
next prev parent reply other threads:[~2011-07-12 13:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 13:00 [PATCH] dmaengine: imx-sdma: return proper error if kzalloc fails Axel Lin
2011-07-12 13:51 ` Sascha Hauer [this message]
2011-07-25 14:24 ` Vinod Koul
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=20110712135128.GV6069@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=axel.lin@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/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 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.