From: Laura Garcia Liebana Date: Sat, 12 Mar 2016 15:19:11 +0000 (+0100) Subject: staging: nvec: Fix comparison to NULL X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f05f33fae3c720bd555ceb15b46beb4c642b663a;p=linux-beck.git staging: nvec: Fix comparison to NULL Replace the use of comparison to NULL, use ! instead. Checkpatch detected these issues. Signed-off-by: Laura Garcia Liebana Signed-off-by: Greg Kroah-Hartman --- 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; }