[U-Boot] [PATCH 2/2] cfi_flash: return NULL for invalid base address input

Stefan Roese sr at denx.de
Thu May 23 09:50:12 CEST 2013


On 05/17/2013 07:50 AM, Masahiro Yamada wrote:
> When base address given was out of valid flash address ranges,
> flash_get_info() function returned the pointer to the last
> element of flash_info[i] array.
> 
> This patch changes this function to return NULL pointer
> in such a case, which is more correct behaviour.
> 
> The function flash_protect_default() calls flash_protect()
> immediately after flash_get_info() invocation.
> With this correction, flash_protect() function would be
> able to return soon, for NULL flash_info.

Applied to u-boot-cfi-flash/master.

Thanks,
Stefan



More information about the U-Boot mailing list