net/ipv4: cleanup error condition testing
diff mbox series

Message ID 20190724100611.GA7516@amd
State Accepted
Commit c7148c03db80e44da7197ec5f558f630333c5cad
Headers show
Series
  • net/ipv4: cleanup error condition testing
Related show

Commit Message

Pavel Machek July 24, 2019, 10:06 a.m. UTC
Cleanup testing for error condition.

Signed-off-by: Pavel Machek <pavel@denx.de>

Comments

David Miller July 24, 2019, 8:57 p.m. UTC | #1
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.

Patch
diff mbox series

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;