diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-09 15:58:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-11 15:36:30 -0700 |
commit | 53fa1f4f1f5234cc2b91b491f00cfa089733c626 (patch) | |
tree | 4b59cc45e90d58868befb7e66cd83e415438dac8 /drivers/staging/dgap | |
parent | fa5cd4cf1bd71ee8535cda0799fae40bb89a2243 (diff) | |
download | talos-op-linux-53fa1f4f1f5234cc2b91b491f00cfa089733c626.tar.gz talos-op-linux-53fa1f4f1f5234cc2b91b491f00cfa089733c626.zip |
staging: dgap: dgap_tty: Do not use 0 for pointers
0 should not be used instead of NULL for pointers.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap_tty.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/dgap/dgap_tty.c b/drivers/staging/dgap/dgap_tty.c index 924e2bfcbe30..2a7a37298da4 100644 --- a/drivers/staging/dgap/dgap_tty.c +++ b/drivers/staging/dgap/dgap_tty.c @@ -595,7 +595,7 @@ static void dgap_sniff_nowait_nolock(struct channel_t *ch, uchar *text, uchar *b /* * Loop while data remains. */ - while (nbuf > 0 && ch->ch_sniff_buf != 0) { + while (nbuf > 0 && ch->ch_sniff_buf) { /* * Determine the amount of available space left in the * buffer. If there's none, wait until some appears. @@ -1107,9 +1107,10 @@ static int dgap_tty_open(struct tty_struct *tty, struct file *file) MAJOR(tty_devnum(tty)), MINOR(tty_devnum(tty)), un, brd->name)); /* - * Error if channel info pointer is 0. + * Error if channel info pointer is NULL. */ - if ((bs = ch->ch_bs) == 0) { + bs = ch->ch_bs; + if (!bs) { DGAP_UNLOCK(ch->ch_lock, lock_flags2); DGAP_UNLOCK(brd->bd_lock, lock_flags); DPR_OPEN(("%d BS is 0!\n", __LINE__)); |