Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1541146
| From | Corentin Labbe <clabbe.montjoie@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/7] hwrng: core: rewrite better comparison to NULL |
| Date | 2016-12-13 16:00 +0100 |
| Message-ID | <sNWIF-2q3-9@gated-at.bofh.it> (permalink) |
| References | <sNWIF-2q3-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch fix the checkpatch warning "Comparison to NULL could be written "!ptr" Signed-off-by: Corentin Labbe <clabbe.montjoie@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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/7] hwrng: core: do not use multiple blank lines Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
[PATCH v2 5/7] hwrng: core: Move hwrng miscdev minor number to include/linux/miscdevice.h Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
[PATCH v2 6/7] hwrng: core: remove unused PFX macro Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
[PATCH v2 7/7] hwrng: core: Remove linux/sched.h from includes Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
Re: [PATCH v2 7/7] hwrng: core: Remove linux/sched.h from includes Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-27 10:20 +0100
[PATCH v2 2/7] hwrng: core: rewrite better comparison to NULL Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
[PATCH v2 4/7] hwrng: core: Replace asm/uaccess.h by linux/uaccess.h Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
[PATCH v2 3/7] hwrng: core: Rewrite the header Corentin Labbe <clabbe.montjoie@gmail.com> - 2016-12-13 16:00 +0100
Re: [PATCH v2 1/7] hwrng: core: do not use multiple blank lines Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-27 11:10 +0100
csiph-web