From 80da7968979ea93b2576074bbc4cafea74073693 Mon Sep 17 00:00:00 2001 From: shizhenghui Date: Fri, 31 May 2024 10:56:35 +0800 Subject: [PATCH] video/v4l2_cap: fix no return after checked null Signed-off-by: shizhenghui --- drivers/video/v4l2_cap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/v4l2_cap.c b/drivers/video/v4l2_cap.c index 79ed399deb0..fc7773c3054 100644 --- a/drivers/video/v4l2_cap.c +++ b/drivers/video/v4l2_cap.c @@ -2379,10 +2379,9 @@ static int capture_dqbuf(FAR struct file *filep, * Therefore, Check cause. */ - if (type_inf->wait_capture.waitend_cause == WAITEND_CAUSE_DQCANCEL) - { - return -ECANCELED; - } + DEBUGASSERT(type_inf->wait_capture.waitend_cause == + WAITEND_CAUSE_DQCANCEL); + return -ECANCELED; } type_inf->wait_capture.done_container = NULL;