diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-04-19 12:11:12 +0200 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2020-04-28 13:52:52 +0200 |
commit | 3c425fc0ef4de31d350695c74db7a3d6be0379b6 (patch) | |
tree | 2cb37697929153f104058967550427e4e4f17ffa /drivers/usb | |
parent | cff0144e4cd0825dda0ae46aa739f0681839cc3a (diff) | |
download | u-boot-3c425fc0ef4de31d350695c74db7a3d6be0379b6.zip u-boot-3c425fc0ef4de31d350695c74db7a3d6be0379b6.tar.gz u-boot-3c425fc0ef4de31d350695c74db7a3d6be0379b6.tar.bz2 |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/ether.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index a118283..8533abf 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -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: |