Skip to content
Commit 24c185cf authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Stefan Roese
Browse files

cfi_flash: return NULL for invalid base address input



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.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent e2e273a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment