usb: ether: avoid NULL check before free()

free() checks if its argument is NULL. Do not duplicate this check.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt 2020-04-19 12:11:12 +02:00 committed by Marek Vasut
parent cff0144e4c
commit 3c425fc0ef

View File

@ -2472,8 +2472,7 @@ static int _usb_eth_send(struct ether_priv *priv, void *packet, int length)
}
usb_gadget_handle_interrupts(0);
}
if (rndis_pkt)
free(rndis_pkt);
free(rndis_pkt);
return 0;
drop: