net: octeontx: Remove unneeded code
In nicvf_rcv_pkt_handler there is no need to initialise err as it is assigned to immediately after. Also the test for !pkt will return if true meaning that pkt is guaranteed to be true after that code block and so no need to test for it and the redundant test can be removed. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
committed by
Jerome Forissier
parent
0c558bbad9
commit
45eedb7b80
@@ -232,7 +232,7 @@ static int nicvf_rcv_pkt_handler(struct nicvf *nic,
|
||||
|
||||
size_t pkt_len;
|
||||
struct cqe_rx_t *cqe_rx = (struct cqe_rx_t *)cq_desc;
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
/* Check for errors */
|
||||
err = nicvf_check_cqe_rx_errs(nic, cq, cq_desc);
|
||||
@@ -245,8 +245,7 @@ static int nicvf_rcv_pkt_handler(struct nicvf *nic,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (pkt)
|
||||
*ppkt = pkt;
|
||||
*ppkt = pkt;
|
||||
|
||||
return pkt_len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user