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:
parent
040757b7e6
commit
c20cb28faf
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue