staging: nvec: Fix comparison to NULL
authorLaura Garcia Liebana <nevola@gmail.com>
Sat, 12 Mar 2016 15:19:11 +0000 (16:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
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>
drivers/staging/nvec/nvec.c

index dc38ca8..c1feccf 100644 (file)
@@ -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;
                        }