[PATCH 06/11] staging: dgnc: change style of NULL comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the NULL comparison style as warned by checkpatch.

Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---
 drivers/staging/dgnc/dgnc_tty.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 35f3ec4..b40fd67 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1469,7 +1469,7 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty)
 	uint chars = 0;
 	unsigned long flags;
 
-	if (tty == NULL)
+	if (!tty)
 		return 0;
 
 	un = tty->driver_data;
@@ -1570,7 +1570,7 @@ static int dgnc_tty_write_room(struct tty_struct *tty)
 	int ret = 0;
 	unsigned long flags;
 
-	if (tty == NULL || dgnc_TmpWriteBuf == NULL)
+	if (!tty || !dgnc_TmpWriteBuf)
 		return 0;
 
 	un = tty->driver_data;
@@ -1649,7 +1649,7 @@ static int dgnc_tty_write(struct tty_struct *tty,
 	ushort tmask;
 	uint remain;
 
-	if (tty == NULL || dgnc_TmpWriteBuf == NULL)
+	if (!tty || !dgnc_TmpWriteBuf)
 		return 0;
 
 	un = tty->driver_data;
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux