[PATCH] media: saa7134: simplify if-if to if-else
From: Wan Jiabing
Date: Mon Apr 11 2022 - 06:57:24 EST
use if and else instead of if(A) and if (!A).
Signed-off-by: Wan Jiabing <wanjiabing@xxxxxxxx>
---
drivers/media/pci/saa7134/saa7134-video.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
index 48543ad3d595..61e678c1c2f6 100644
--- a/drivers/media/pci/saa7134/saa7134-video.c
+++ b/drivers/media/pci/saa7134/saa7134-video.c
@@ -1833,8 +1833,7 @@ static int saa7134_overlay(struct file *file, void *priv, unsigned int on)
spin_lock_irqsave(&dev->slock, flags);
start_preview(dev);
spin_unlock_irqrestore(&dev->slock, flags);
- }
- if (!on) {
+ } else {
if (priv != dev->overlay_owner)
return -EINVAL;
spin_lock_irqsave(&dev->slock, flags);
--
2.35.1