net: caif: remove redundant null check on frontpkt
Subsystems (3)
PATCH 1/1 net: caif: remove redundant null check on frontpkt
From: Colin Ian King <[email protected]>
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 realpkt 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 <[email protected]>
--- net/caif/cfrfml.c | 3 --- 1 file changed, 3 deletions(-)
net/caif/cfrfml.c +0 -3
@@ -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;
Signature · 1 line
2.17.1