Commit 2a971e3b authored by Corentin LABBE's avatar Corentin LABBE Committed by Herbert Xu

hwrng: core - rewrite better comparison to NULL

This patch fix the checkpatch warning "Comparison to NULL could be written "!ptr"
Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 6bc17d90
...@@ -442,8 +442,7 @@ int hwrng_register(struct hwrng *rng) ...@@ -442,8 +442,7 @@ int hwrng_register(struct hwrng *rng)
int err = -EINVAL; int err = -EINVAL;
struct hwrng *old_rng, *tmp; struct hwrng *old_rng, *tmp;
if (rng->name == NULL || if (!rng->name || (!rng->data_read && !rng->read))
(rng->data_read == NULL && rng->read == NULL))
goto out; goto out;
mutex_lock(&rng_mutex); mutex_lock(&rng_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment