Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Laura Garcia Liebana and committed by
Greg Kroah-Hartman
f05f33fa 9fc27699

+2 -2
+2 -2
drivers/staging/nvec/nvec.c
··· 264 264 265 265 msg = nvec_msg_alloc(nvec, NVEC_MSG_TX); 266 266 267 - if (msg == NULL) 267 + if (!msg) 268 268 return -ENOMEM; 269 269 270 270 msg->data[0] = size; ··· 620 620 } else { 621 621 nvec->rx = nvec_msg_alloc(nvec, NVEC_MSG_RX); 622 622 /* Should not happen in a normal world */ 623 - if (unlikely(nvec->rx == NULL)) { 623 + if (unlikely(!nvec->rx)) { 624 624 nvec->state = 0; 625 625 break; 626 626 }