diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/subdev/icap.c b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/icap.c index 858add6ff70..91e26d3ff4b 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/subdev/icap.c +++ b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/icap.c @@ -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");