This patch fix the checkpatch warning "Comparison to NULL could be written 
"!ptr"

Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com>
---
 drivers/char/hw_random/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 00cbb81..7029246 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -439,8 +439,7 @@ int hwrng_register(struct hwrng *rng)
        int err = -EINVAL;
        struct hwrng *old_rng, *tmp;
 
-       if (rng->name == NULL ||
-           (rng->data_read == NULL && rng->read == NULL))
+       if (!rng->name || (!rng->data_read && !rng->read))
                goto out;
 
        mutex_lock(&rng_mutex);
-- 
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to