flash: require unique flash bank name
Make sure the flash bank name is unique Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
parent
7b36d2a229
commit
a7fb60dc7b
|
@ -795,6 +795,14 @@ COMMAND_HANDLER(handle_flash_bank_command)
|
||||||
return ERROR_FAIL;
|
return ERROR_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check the flash bank name is unique */
|
||||||
|
if (get_flash_bank_by_name(bank_name) != NULL)
|
||||||
|
{
|
||||||
|
/* flash bank name already exists */
|
||||||
|
LOG_ERROR("flash bank name '%s' already exists", bank_name);
|
||||||
|
return ERROR_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
/* register flash specific commands */
|
/* register flash specific commands */
|
||||||
if (NULL != driver->commands)
|
if (NULL != driver->commands)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue