From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chin Liang See Date: Thu, 17 Jul 2014 06:00:52 -0500 Subject: [U-Boot] socfpga: initialize MMC In-Reply-To: <20140716131330.A93E83804B5@gemini.denx.de> References: <20140716123422.GA8844@amd.pavel.ucw.cz> <20140716125238.CF3833804B5@gemini.denx.de> <20140716131330.A93E83804B5@gemini.denx.de> Message-ID: <1405594852.2088.8.camel@clsee-VirtualBox.altera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Wed, 2014-07-16 at 15:13 +0200, ZY - wd wrote: > Dear Pavel, > > In message <20140716125238.CF3833804B5@gemini.denx.de> I wrote: > > > > > + add_dwmci(host, host->bus_hz, host->bus_hz); > > > > Is there a free(host) anywhere? Actually the host will be referred throughout the code execution when SDMMC access is required. Hence, we can only call the free when exit which deems not needed then. Thanks Chin Liang > > I think there is none, which raises the question why you use malloc() > in the first place. Just use a struct on the stack. > > Also, please make sure to check the return code of add_dwmci() for > errors, and handle these as needed. > > Best regards, > > Wolfgang Denk >