Commit 562c4798 authored by Shraddha Barke's avatar Shraddha Barke Committed by Greg Kroah-Hartman
Browse files

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: default avatarShraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff52fc38
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment