Skip to content

Commit

Permalink
Return ENODATA Error code if bitstream is not present (#7694)
Browse files Browse the repository at this point in the history
* Return ENODATA Error if bitstream is not present

Signed-off-by: Manoj Takasi <[email protected]>

* Update icap.c

* Modifed Error message

* Updated icap.c

---------

Signed-off-by: Manoj Takasi <[email protected]>
  • Loading branch information
ManojTakasi authored Sep 8, 2023
1 parent aa3449c commit 4af5050
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtime_src/core/pcie/driver/linux/xocl/subdev/icap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,11 @@ static int icap_download_hw(struct icap *icap, const struct axlf *axlf)
primaryFirmwareOffset = primaryHeader->m_sectionOffset;
primaryFirmwareLength = primaryHeader->m_sectionSize;
}
else {
ICAP_ERR(icap,"Invalid xclbin. Bitstream is not present in xclbin");
err = -ENODATA;
goto done;
}

if ((primaryFirmwareOffset + primaryFirmwareLength) > length) {
ICAP_ERR(icap, "Invalid BITSTREAM size");
Expand Down

0 comments on commit 4af5050

Please sign in to comment.