diff --git a/drivers/rpmsg/rpmsg_port.c b/drivers/rpmsg/rpmsg_port.c index 5668aecd7e..75483c73c1 100644 --- a/drivers/rpmsg/rpmsg_port.c +++ b/drivers/rpmsg/rpmsg_port.c @@ -281,7 +281,10 @@ static int rpmsg_port_send_offchannel_nocopy(FAR struct rpmsg_device *rdev, sizeof(struct rpmsg_hdr) + len; rpmsg_port_queue_add_buffer(&port->txq, hdr); - port->ops->notify_tx_ready(port); + if (port->ops->notify_tx_ready) + { + port->ops->notify_tx_ready(port); + } return len; } @@ -340,7 +343,10 @@ static void rpmsg_port_release_rx_buffer(FAR struct rpmsg_device *rdev, if ((reserved & RPMSG_BUF_HELD_MASK) == (1 << RPMSG_BUF_HELD_SHIFT)) { rpmsg_port_queue_return_buffer(&port->rxq, hdr); - port->ops->notify_rx_free(port); + if (port->ops->notify_rx_free) + { + port->ops->notify_rx_free(port); + } } }