flash-bios: Do not delete image in case of failure

The code was to delete the BIOS image after the BIOS code update is
finished no matter if the update is successful or not.

Change the logic to not delete the image when it fails, so that we could
examine what's wrong and retry the update.

To delete the image, use DELETE API.

Tested: Verify the image is not deleted when BIOS code update fails.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ic4d985b0e48bc134f710590aa06098b1e15b1c27
1 file changed