提交 2a971e3b 编写于 作者: C Corentin LABBE 提交者: 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: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 6bc17d90
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册