Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Shubham Patil <[email protected]>
  • Loading branch information
jadhavrohit924 and shubhamdp authored Aug 8, 2024
1 parent 14e2da8 commit cff3f50
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/platform/ESP32/OTAImageProcessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,7 @@ esp_err_t OTAImageProcessorImpl::DeltaOTAWriteCallback(const uint8_t * buf, size
imageProcessor->chipIdVerified = true;

// Write data in headerData buffer.
esp_err_t err = esp_ota_write(imageProcessor->mOTAUpdateHandle, headerData, IMG_HEADER_LEN);
if (err != ESP_OK)
{
return err;
}
return esp_ota_write(imageProcessor->mOTAUpdateHandle, headerData, IMG_HEADER_LEN);
}
}

Expand Down Expand Up @@ -325,6 +321,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context)
if (imageProcessor->mDeltaOTAUpdateHandle == NULL)
{
ChipLogError(SoftwareUpdate, "esp_delta_ota_init failed");
imageProcessor->mDownloader->OnPreparedForDownload(CHIP_ERROR_INTERNAL);
return;
}
#endif // CONFIG_ENABLE_DELTA_OTA
Expand Down

0 comments on commit cff3f50

Please sign in to comment.