summaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-09-14 18:19:16 +0100
committerDavid S. Miller <davem@davemloft.net>2018-09-17 18:49:57 -0700
commit5d288b88655d5bea0cf3a42158cb3bf7916587bc (patch)
tree8339f4e4b9dd73af3803fcdcab971096320dc62a /net/caif
parentce5b127b172eac8adc5cb386dc19cf58acf5536c (diff)
downloadlinux-5d288b88655d5bea0cf3a42158cb3bf7916587bc.tar.gz
linux-5d288b88655d5bea0cf3a42158cb3bf7916587bc.tar.bz2
linux-5d288b88655d5bea0cf3a42158cb3bf7916587bc.zip
net: caif: remove redundant null check on frontpkt
It is impossible for frontpkt to be null at the point of the null check because it has been assigned from rearpkt and there is no way rearpkt can be null at the point of the assignment because of the sanity checking and exit paths taken previously. Remove the redundant null check. Detected by CoverityScan, CID#114434 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/cfrfml.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/caif/cfrfml.c b/net/caif/cfrfml.c
index b82440e1fcb4..a931a71ef6df 100644
--- a/net/caif/cfrfml.c
+++ b/net/caif/cfrfml.c
@@ -264,9 +264,6 @@ static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt)
frontpkt = rearpkt;
rearpkt = NULL;
- err = -ENOMEM;
- if (frontpkt == NULL)
- goto out;
err = -EPROTO;
if (cfpkt_add_head(frontpkt, head, 6) < 0)
goto out;