]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: nvec: Use x instead of x != NULL to improve readability.
authorTom Mounet <tommounet@gmail.com>
Sat, 29 Jun 2024 17:47:04 +0000 (19:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 14:15:26 +0000 (16:15 +0200)
Use x instead of x != NULL to improve readability.
Issue identified by checkpatch.

Signed-off-by: Tom Mounet <tommounet@gmail.com>
Reviewed-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/66804898.5d0a0220.6df0f.4f0a@mx.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/nvec/nvec.c

index d67d2f3338b233bf003bbef28fc3dc93c4cae9c6..d09211589d1cf15826f13e1be4ce58915b76f79b 100644 (file)
@@ -300,7 +300,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
 {
        mutex_lock(&nvec->sync_write_mutex);
 
-       if (msg != NULL)
+       if (msg)
                *msg = NULL;
 
        nvec->sync_write_pending = (data[1] << 8) + data[0];
@@ -322,7 +322,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
 
        dev_dbg(nvec->dev, "nvec_sync_write: pong!\n");
 
-       if (msg != NULL)
+       if (msg)
                *msg = nvec->last_sync_msg;
        else
                nvec_msg_free(nvec, nvec->last_sync_msg);