All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: nvec: Fix comparison to NULL
@ 2016-03-12 15:19 Laura Garcia Liebana
  0 siblings, 0 replies; only message in thread
From: Laura Garcia Liebana @ 2016-03-12 15:19 UTC (permalink / raw)
  To: outreachy-kernel

Replace the use of comparison to NULL, use !<expression> instead. Checkpatch detected these issues.

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
---
 drivers/staging/nvec/nvec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 9fda136..8d589a4 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;
 			}
-- 
2.7.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-12 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12 15:19 [PATCH] staging: nvec: Fix comparison to NULL Laura Garcia Liebana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.