[PATCH 06/13] bootm: close open files

Sascha Hauer s.hauer at pengutronix.de
Mon Oct 8 16:18:11 EDT 2012


On Mon, Oct 08, 2012 at 12:01:20AM +0200, Vicente wrote:
> 
> Signed-off-by: Vicente <vicencb at gmail.com>
> ---
>  arch/arm/lib/bootm.c | 4 +++-
>  commands/bootm.c     | 6 +++++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index c5b76ea..288c0b2 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -269,8 +269,9 @@ static int do_bootz_linux(struct image_data *data)
>  
>  	ret = do_bootz_linux_fdt(fd, data);
>  	if (ret && ret != -ENXIO)
> -		return ret;
> +		goto err_out;
>  
> +	close(fd);
>  	return __do_bootm_linux(data, swap);

ret = __do_bootm_linux and fall through?

Sascha


-- 
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 |



More information about the barebox mailing list