shell: flash: just call do_flash_release() in flash_probe() to avoid code duplication
This commit is contained in:
parent
7b5187973a
commit
7ae378ddba
1 changed files with 1 additions and 4 deletions
|
@ -101,10 +101,7 @@ static void do_flash_probe(const char *s)
|
|||
{
|
||||
(void)s;
|
||||
|
||||
if (flash) {
|
||||
flash_release(flash);
|
||||
flash = NULL;
|
||||
}
|
||||
do_flash_release(NULL);
|
||||
|
||||
if (!(flash = flash_probe())) {
|
||||
fprintf(stderr, "error: unable to probe the flash device.\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue