From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 19 Feb 2014 06:34:03 -0800 From: Greg KH To: Ivan Khoronzhuk Subject: Re: [PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver Message-ID: <20140219143403.GA31063@kroah.com> References: <1391629574-18955-1-git-send-email-ivan.khoronzhuk@ti.com> <1391629574-18955-2-git-send-email-ivan.khoronzhuk@ti.com> <20140218203049.GA18647@kroah.com> <53048822.2080307@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53048822.2080307@ti.com> Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, grygorii.strashko@ti.com, linux@arm.linux.org.uk, pawel.moll@arm.com, swarren@wwwdotorg.org, ijc+devicetree@hellion.org.uk, nsekhar@ti.com, galak@kernel.crashing.org, rob.herring@calxeda.com, linux-kernel@vger.kernel.org, "\[initial author\] Murali Karicheri" , santosh.shilimkar@ti.com, rob@landley.net, linux-mtd@lists.infradead.org, dwmw2@infradead.org, linux-arm-kernel@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote: > >> + aemif->clk = devm_clk_get(dev, NULL); > >> + if (IS_ERR(aemif->clk)) { > >> + dev_err(dev, "cannot get clock 'aemif'\n"); > >> + return PTR_ERR(aemif->clk); > > No freeing memory? > > There is no need to free memory explicitly. > devm_kzalloc is used instead of kzalloc. Yes, but where does the device on the error path get removed? From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregkh@linuxfoundation.org (Greg KH) Date: Wed, 19 Feb 2014 06:34:03 -0800 Subject: [PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver In-Reply-To: <53048822.2080307@ti.com> References: <1391629574-18955-1-git-send-email-ivan.khoronzhuk@ti.com> <1391629574-18955-2-git-send-email-ivan.khoronzhuk@ti.com> <20140218203049.GA18647@kroah.com> <53048822.2080307@ti.com> Message-ID: <20140219143403.GA31063@kroah.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote: > >> + aemif->clk = devm_clk_get(dev, NULL); > >> + if (IS_ERR(aemif->clk)) { > >> + dev_err(dev, "cannot get clock 'aemif'\n"); > >> + return PTR_ERR(aemif->clk); > > No freeing memory? > > There is no need to free memory explicitly. > devm_kzalloc is used instead of kzalloc. Yes, but where does the device on the error path get removed? From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver Date: Wed, 19 Feb 2014 06:34:03 -0800 Message-ID: <20140219143403.GA31063@kroah.com> References: <1391629574-18955-1-git-send-email-ivan.khoronzhuk@ti.com> <1391629574-18955-2-git-send-email-ivan.khoronzhuk@ti.com> <20140218203049.GA18647@kroah.com> <53048822.2080307@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <53048822.2080307-l0cyMroinI0@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ivan Khoronzhuk Cc: santosh.shilimkar-l0cyMroinI0@public.gmane.org, rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, galak-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org, swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, grygorii.strashko-l0cyMroinI0@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, nsekhar-l0cyMroinI0@public.gmane.org, "[initial author] Murali Karicheri" List-Id: devicetree@vger.kernel.org On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote: > >> + aemif->clk = devm_clk_get(dev, NULL); > >> + if (IS_ERR(aemif->clk)) { > >> + dev_err(dev, "cannot get clock 'aemif'\n"); > >> + return PTR_ERR(aemif->clk); > > No freeing memory? > > There is no need to free memory explicitly. > devm_kzalloc is used instead of kzalloc. Yes, but where does the device on the error path get removed? -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753748AbaBSObb (ORCPT ); Wed, 19 Feb 2014 09:31:31 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:57648 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753375AbaBSOba (ORCPT ); Wed, 19 Feb 2014 09:31:30 -0500 Date: Wed, 19 Feb 2014 06:34:03 -0800 From: Greg KH To: Ivan Khoronzhuk Cc: santosh.shilimkar@ti.com, rob@landley.net, linux@arm.linux.org.uk, galak@kernel.crashing.org, devicetree@vger.kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, rob.herring@calxeda.com, swarren@wwwdotorg.org, ijc+devicetree@hellion.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, grygorii.strashko@ti.com, dwmw2@infradead.org, nsekhar@ti.com, "[initial author] Murali Karicheri" Subject: Re: [PATCH v4 1/2] memory: ti-aemif: introduce AEMIF driver Message-ID: <20140219143403.GA31063@kroah.com> References: <1391629574-18955-1-git-send-email-ivan.khoronzhuk@ti.com> <1391629574-18955-2-git-send-email-ivan.khoronzhuk@ti.com> <20140218203049.GA18647@kroah.com> <53048822.2080307@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53048822.2080307@ti.com> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2014 at 12:32:02PM +0200, Ivan Khoronzhuk wrote: > >> + aemif->clk = devm_clk_get(dev, NULL); > >> + if (IS_ERR(aemif->clk)) { > >> + dev_err(dev, "cannot get clock 'aemif'\n"); > >> + return PTR_ERR(aemif->clk); > > No freeing memory? > > There is no need to free memory explicitly. > devm_kzalloc is used instead of kzalloc. Yes, but where does the device on the error path get removed?