summaryrefslogtreecommitdiff
path: root/src/cec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cec.c')
-rw-r--r--src/cec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cec.c b/src/cec.c
index 30c95d8..4b6acf5 100644
--- a/src/cec.c
+++ b/src/cec.c
@@ -155,6 +155,9 @@ int cecrx(void)
cecsize = read(cecreadfd, buf, sizeof(buf));
close(cecreadfd);
+ if (cecsize < 0)
+ return -1;
+
for (cnt = 0; cnt < cecsize; cnt++)
LOGHDMILIB2("cecrx[%d]:%x", cnt, buf[cnt]);