flash/nor: remove useless bank->next = NULL

struct flash_bank must be zeroed anyway, calloc() is always used.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I7ab3b9c66f99688c6095a0a547a05448c9e37d68
Reviewed-on: https://review.openocd.org/c/openocd/+/7885
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tomas Vanek 2023-09-05 18:52:38 +02:00 committed by Antonio Borneo
parent 040757b7e6
commit c20cb28faf
4 changed files with 0 additions and 5 deletions

View File

@ -576,7 +576,6 @@ static int at91sam7_read_part_info(struct flash_bank *bank)
return ERROR_FAIL; return ERROR_FAIL;
} }
fb->name = strdup("sam7_probed"); fb->name = strdup("sam7_probed");
fb->next = NULL;
/* link created bank in 'flash_banks' list */ /* link created bank in 'flash_banks' list */
t_bank->next = fb; t_bank->next = fb;
@ -765,7 +764,6 @@ FLASH_BANK_COMMAND_HANDLER(at91sam7_flash_bank_command)
return ERROR_FAIL; return ERROR_FAIL;
} }
fb->name = strdup("sam7_probed"); fb->name = strdup("sam7_probed");
fb->next = NULL;
/* link created bank in 'flash_banks' list */ /* link created bank in 'flash_banks' list */
t_bank->next = fb; t_bank->next = fb;

View File

@ -261,7 +261,6 @@ FLASH_BANK_COMMAND_HANDLER(cc26xx_flash_bank_command)
/* Finish initialization of bank */ /* Finish initialization of bank */
bank->driver_priv = cc26xx_bank; bank->driver_priv = cc26xx_bank;
bank->next = NULL;
return ERROR_OK; return ERROR_OK;
} }

View File

@ -96,7 +96,6 @@ FLASH_BANK_COMMAND_HANDLER(cc3220sf_flash_bank_command)
/* Finish initialization of flash bank */ /* Finish initialization of flash bank */
bank->driver_priv = cc3220sf_bank; bank->driver_priv = cc3220sf_bank;
bank->next = NULL;
return ERROR_OK; return ERROR_OK;
} }

View File

@ -331,7 +331,6 @@ FLASH_BANK_COMMAND_HANDLER(npcx_flash_bank_command)
/* Finish initialization of bank */ /* Finish initialization of bank */
bank->driver_priv = npcx_bank; bank->driver_priv = npcx_bank;
bank->next = NULL;
return ERROR_OK; return ERROR_OK;
} }