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 @@ struct ratp_ctx *ctx; struct ratp *ratp; + if (!cdev->getc || !cdev->putc) + return -EINVAL; + if (ratp_command_ctx) { ctx = ratp_command_ctx; } else {