From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752961AbaCJCTy (ORCPT ); Sun, 9 Mar 2014 22:19:54 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:49056 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752615AbaCJCTw (ORCPT ); Sun, 9 Mar 2014 22:19:52 -0400 Date: Sun, 09 Mar 2014 19:19:51 -0700 (PDT) Message-ID: <87y50ire0r.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto To: Joe Perches Cc: Vinod Koul , Morimoto , Linux-SH , linux-kernel@vger.kernel.org, Geert Uytterhoeven , dmaengine@vger.kernel.org Subject: Re: [PATCH v2][RESENT] dma: add R-Car Audio DMAC peri peri driver In-Reply-To: <1394416022.30791.7.camel@joe-AO722> References: <878uu6gle8.wl%kuninori.morimoto.gx@gmail.com> <874n36supd.wl%kuninori.morimoto.gx@gmail.com> <1394416022.30791.7.camel@joe-AO722> User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe > > diff --git a/drivers/dma/sh/rcar-audmapp.c b/drivers/dma/sh/rcar-audmapp.c > [] > > +static int audmapp_chan_probe(struct platform_device *pdev, > > + struct audmapp_device *audev, int id) > > +{ > [] > > + auchan = devm_kzalloc(dev, sizeof(struct audmapp_chan), GFP_KERNEL); > > + if (!auchan) { > > + dev_err(dev, "No free memory for allocating dma channels!\n"); > > Unnecessary OOM as the alloc has a generic OOM > and a dump_stack() > > [] > > +static int audmapp_probe(struct platform_device *pdev) > > +{ > [] > > + audev = devm_kzalloc(&pdev->dev, sizeof(struct audmapp_device), > > + GFP_KERNEL); > > + if (!audev) { > > + dev_err(&pdev->dev, "Not enough memory\n"); > > here too Thank you. will fix in v3