shell: flash: just call do_flash_release() in flash_probe() to avoid code duplication

This commit is contained in:
S.J.R. van Schaik 2017-06-14 13:30:02 +02:00
parent 7b5187973a
commit 7ae378ddba

View file

@ -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");