diff options
Diffstat (limited to 'EmbeddedPkg/SerialDxe')
-rw-r--r-- | EmbeddedPkg/SerialDxe/SerialIo.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/EmbeddedPkg/SerialDxe/SerialIo.c b/EmbeddedPkg/SerialDxe/SerialIo.c index b9ea4b9c42..fe0b1711a8 100644 --- a/EmbeddedPkg/SerialDxe/SerialIo.c +++ b/EmbeddedPkg/SerialDxe/SerialIo.c @@ -193,8 +193,12 @@ SerialRead ( if (SerialPortPoll()) {
Count = SerialPortRead (Buffer, *BufferSize);
*BufferSize = Count;
+ return (Count == 0) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
}
- return (Count == 0) ? EFI_DEVICE_ERROR : EFI_SUCCESS;
+
+ // No data to return
+ *BufferSize = 0;
+ return EFI_SUCCESS;
}
|