summaryrefslogtreecommitdiff
path: root/drivers/staging/nvec
diff options
context:
space:
mode:
authorLaura Garcia Liebana <nevola@gmail.com>2016-03-12 16:19:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-28 07:30:36 -0700
commitf05f33fae3c720bd555ceb15b46beb4c642b663a (patch)
tree31f2a789e689fe2b54464819b7fff5768b54fac3 /drivers/staging/nvec
parent9fc27699bd16707ae95218ba553bde144f5afbed (diff)
staging: nvec: Fix comparison to NULL
Replace the use of comparison to NULL, use !<expression> instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r--drivers/staging/nvec/nvec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index dc38ca815806..c1feccf8d94a 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -264,7 +264,7 @@ int nvec_write_async(struct nvec_chip *nvec, const unsigned char *data,
msg = nvec_msg_alloc(nvec, NVEC_MSG_TX);
- if (msg == NULL)
+ if (!msg)
return -ENOMEM;
msg->data[0] = size;
@@ -620,7 +620,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
} else {
nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX);
/* Should not happen in a normal world */
- if (unlikely(nvec->rx == NULL)) {
+ if (unlikely(!nvec->rx)) {
nvec->state = 0;
break;
}