flash: require unique flash bank name
Make sure the flash bank name is unique Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>__archive__
parent
7b36d2a229
commit
a7fb60dc7b
|
@ -795,6 +795,14 @@ COMMAND_HANDLER(handle_flash_bank_command)
|
|||
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 */
|
||||
if (NULL != driver->commands)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue