lkml.org 
[lkml]   [2015]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/11] staging: dgnc: change style of NULL comparison
Date
Change the NULL comparison style as warned by checkpatch.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
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


\
 
 \ /
  Last update: 2015-10-03 17:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog