Don't fail if returning less data than the buffer size
It's perfectly normal !
Change-Id: I13c583919ccba6e95e7a016a90bd3d249b7324f1
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
diff --git a/sbe_chipOp_handler.cpp b/sbe_chipOp_handler.cpp
index 81a24b0..e7d1f57 100644
--- a/sbe_chipOp_handler.cpp
+++ b/sbe_chipOp_handler.cpp
@@ -93,14 +93,6 @@
<< len << " errno=" << errno;
throw std::runtime_error(errMsg.str().c_str());
}
- else if (len != bytesToRead)
- {
- //TODO:use elog infrastructure
- errMsg << "Exepcted " << bytesToRead << " bytes to be read from FIFO"
- " device:" << devPath << ", but bytes read are " << len <<
- " errno= " << errno;
- throw std::runtime_error(errMsg.str().c_str());
- }
//Extract the valid number of words read.
for (auto i = 0; i < (rc / WORD_SIZE); ++i)