From 7e17af1ca7a0f9cb990f83c3e03e379520257683 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 16 Oct 2025 13:42:59 -0400 Subject: kern: iotap: Return -ENOTSUP if I/O tap op is NULL If an I/O tap operation is unimplemented, return the -ENOTSUP error code before trying to call it. Signed-off-by: Ian Moffett --- src/sys/os/os_iotap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/sys/os/os_iotap.c b/src/sys/os/os_iotap.c index 238acfe..54d1157 100644 --- a/src/sys/os/os_iotap.c +++ b/src/sys/os/os_iotap.c @@ -130,6 +130,9 @@ iotap_mux(const char *name, struct iotap_msg *msg) ops = desc.ops; switch (msg->opcode) { case IOTAP_OPC_READ: + if (ops->read == NULL) { + return -ENOTSUP; + } return ops->read(&desc, msg->buf, msg->len); } -- cgit v1.2.3