summaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/devsynth.c
diff options
context:
space:
mode:
authorShraddha Barke2015-09-11 08:02:26 +0200
committerGreg Kroah-Hartman2015-09-13 03:25:00 +0200
commit562c47982df0e46499042dfcc06b4dfa8324f63d (patch)
tree92fd9e53c586b8a07b0c3802ec8f71c14447804a /drivers/staging/speakup/devsynth.c
parentStaging: speakup: varhandlers.c: Remove explicit NULL comparison (diff)
downloadkernel-qcow2-linux-562c47982df0e46499042dfcc06b4dfa8324f63d.tar.gz
kernel-qcow2-linux-562c47982df0e46499042dfcc06b4dfa8324f63d.tar.xz
kernel-qcow2-linux-562c47982df0e46499042dfcc06b4dfa8324f63d.zip
Staging: speakup: devsynth.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/devsynth.c')
-rw-r--r--drivers/staging/speakup/devsynth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/speakup/devsynth.c b/drivers/staging/speakup/devsynth.c
index 71c728acf4ca..d1ffdf4c0c4b 100644
--- a/drivers/staging/speakup/devsynth.c
+++ b/drivers/staging/speakup/devsynth.c
@@ -22,7 +22,7 @@ static ssize_t speakup_file_write(struct file *fp, const char __user *buffer,
unsigned long flags;
u_char buf[256];
- if (synth == NULL)
+ if (!synth)
return -ENODEV;
while (count > 0) {
bytes = min(count, sizeof(buf));
@@ -45,7 +45,7 @@ static ssize_t speakup_file_read(struct file *fp, char __user *buf,
static int speakup_file_open(struct inode *ip, struct file *fp)
{
- if (synth == NULL)
+ if (!synth)
return -ENODEV;
if (xchg(&dev_opened, 1))
return -EBUSY;