diff options
Diffstat (limited to 'common/spl/spl_mmc.c')
| -rw-r--r-- | common/spl/spl_mmc.c | 22 | 
1 files changed, 5 insertions, 17 deletions
| diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 170fa3871..f27b4c277 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -4,23 +4,7 @@   *   * Aneesh V <aneesh@ti.com>   * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier:	GPL-2.0+   */  #include <common.h>  #include <spl.h> @@ -29,6 +13,7 @@  #include <mmc.h>  #include <fat.h>  #include <version.h> +#include <image.h>  DECLARE_GLOBAL_DATA_PTR; @@ -46,6 +31,9 @@ static int mmc_load_image_raw(struct mmc *mmc, unsigned long sector)  	if (err == 0)  		goto end; +	if (image_get_magic(header) != IH_MAGIC) +		return -1; +  	spl_parse_image_header(header);  	/* convert size to sectors - round up */ |