forked from Minki/linux
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>
This commit is contained in:
parent
ce5b127b17
commit
5d288b8865
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user