This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1d4f8a567dc1f35d506c6ecc395cc8a62278c303 Author: Yongrong Wang <[email protected]> AuthorDate: Tue Mar 10 19:31:45 2026 +0800 drivers/rpmsg: drop the cleanup loop for a single work queue When rpmsg_create_wqueues() fails to create a work queue it frees the ones created before it. With CONFIG_RPMSG_WQUEUE_NUMBER == 1 there are none and the loop is dead code (Coverity DEADCODE). Build it only when there is more than one work queue. Signed-off-by: Yongrong Wang <[email protected]> --- drivers/rpmsg/rpmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rpmsg/rpmsg.c b/drivers/rpmsg/rpmsg.c index d319f56b3ba..9fe84c17b7a 100644 --- a/drivers/rpmsg/rpmsg.c +++ b/drivers/rpmsg/rpmsg.c @@ -306,11 +306,13 @@ static int rpmsg_create_wqueues(FAR struct rpmsg_wqueue_s *wqueues, if (wqueue->kwqueue == NULL) { rpmsgerr("rpmsg wqueue [%d] create failed\n", i); +#if CONFIG_RPMSG_WQUEUE_NUMBER > 1 while (--i >= 0) { work_queue_free(wqueues[i].kwqueue); wqueues[i].kwqueue = NULL; } +#endif ret = -ENOMEM; break;
