diff mbox series

media: renesas: rzg2l-cru: Simplify FIFO empty check

Message ID 20250428095208.99062-1-prabhakar.mahadev-lad.rj@bp.renesas.com
State New
Headers show
Series media: renesas: rzg2l-cru: Simplify FIFO empty check | expand

Commit Message

Prabhakar April 28, 2025, 9:52 a.m. UTC
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Simplify the `rzg2l_fifo_empty()` helper by removing the redundant
comparison in the return path. Now the function explicitly returns `true`
if the FIFO write and read pointers match, and `false` otherwise, improving
readability without changing behavior.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/aAtQThCibZCROETx@stanley.mountain/
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index 067c6af14e95..97faefcd6019 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -348,7 +348,7 @@  bool rzg2l_fifo_empty(struct rzg2l_cru_dev *cru)
 	if (amnfifopntr_w == amnfifopntr_r_y)
 		return true;
 
-	return amnfifopntr_w == amnfifopntr_r_y;
+	return false;
 }
 
 void rzg2l_cru_stop_image_processing(struct rzg2l_cru_dev *cru)