2022-04-12 03:00:53

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] media: saa7134: simplify if-if to if-else

use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <[email protected]>
---
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