From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vipin Kumar Date: Fri, 14 Dec 2012 15:02:04 +0530 Subject: [U-Boot] [PATCH v3] imls: Add support to list images in NAND device In-Reply-To: <1355435941.14046.9@snotra> References: <1355435941.14046.9@snotra> Message-ID: <50CAF214.8050608@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >> + >> + switch (genimg_get_format(buffer)) { >> + case IMAGE_FORMAT_LEGACY: >> + header = (const image_header_t *)buffer; >> + len = image_get_image_size(header); >> + >> + ret = nand_imls_legacyimage(nand, >> nand_dev, >> + off, len); >> + if (ret< 0&& ret != -ENOMEM) >> + return ret; >> + break; >> +#if defined(CONFIG_FIT) >> + case IMAGE_FORMAT_FIT: >> + len = fit_get_size(buffer); >> + ret = nand_imls_fitimage(nand, nand_dev, >> + off, len); >> + if (ret< 0&& ret != -ENOMEM) >> + return ret; >> + break; >> +#endif >> + } > > Do you really mean to return from the main imls function just because > one image has an error? By "use return" I meant return from the > subfunction. > This return only corresponds to the situation when there is an error returned from nand read routine. In that case, I don't think there is any use reading the NAND any further. What do you think ? > -Scott >