diff mbox series

media: saa7134: simplify if-if to if-else

Message ID 20220411105650.723082-1-wanjiabing@vivo.com
State Accepted
Commit 802239d55d0a76ac2718ed322ee3f2e41c20f6a6
Headers show
Series media: saa7134: simplify if-if to if-else | expand

Commit Message

Wan Jiabing April 11, 2022, 10:56 a.m. UTC
use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/media/pci/saa7134/saa7134-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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);