Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -442,8 +442,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);