* [PATCH] net/ipv4: cleanup error condition testing
@ 2019-07-24 10:06 Pavel Machek
2019-07-24 20:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2019-07-24 10:06 UTC (permalink / raw)
To: davem, kuznet, yoshfuji, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
Cleanup testing for error condition.
Signed-off-by: Pavel Machek <pavel@denx.de>
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index d666756..a999451 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -331,7 +331,7 @@ struct inet_frag_queue *inet_frag_find(struct fqdir *fqdir, void *key)
prev = rhashtable_lookup(&fqdir->rhashtable, key, fqdir->f->rhash_params);
if (!prev)
fq = inet_frag_create(fqdir, key, &prev);
- if (prev && !IS_ERR(prev)) {
+ if (!IS_ERR_OR_NULL(prev)) {
fq = prev;
if (!refcount_inc_not_zero(&fq->refcnt))
fq = NULL;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/ipv4: cleanup error condition testing
2019-07-24 10:06 [PATCH] net/ipv4: cleanup error condition testing Pavel Machek
@ 2019-07-24 20:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-24 20:57 UTC (permalink / raw)
To: pavel; +Cc: kuznet, yoshfuji, netdev, linux-kernel
From: Pavel Machek <pavel@ucw.cz>
Date: Wed, 24 Jul 2019 12:06:11 +0200
> Cleanup testing for error condition.
>
> Signed-off-by: Pavel Machek <pavel@denx.de>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-24 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24 10:06 [PATCH] net/ipv4: cleanup error condition testing Pavel Machek
2019-07-24 20:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).