summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/ratp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/ratp.c b/common/ratp.c
index e879e2b..7be86d4 100644
--- a/common/ratp.c
+++ b/common/ratp.c
@@ -443,6 +443,9 @@ int barebox_ratp(struct console_device *cdev)
struct ratp_ctx *ctx;
struct ratp *ratp;
+ if (!cdev->getc || !cdev->putc)
+ return -EINVAL;
+
if (ratp_command_ctx) {
ctx = ratp_command_ctx;
} else {