Commit 5d288b88 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce5b127b
...@@ -264,9 +264,6 @@ static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt) ...@@ -264,9 +264,6 @@ static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt)
frontpkt = rearpkt; frontpkt = rearpkt;
rearpkt = NULL; rearpkt = NULL;
err = -ENOMEM;
if (frontpkt == NULL)
goto out;
err = -EPROTO; err = -EPROTO;
if (cfpkt_add_head(frontpkt, head, 6) < 0) if (cfpkt_add_head(frontpkt, head, 6) < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment