diff options
author | Heinrich Schuchardt | 2020-04-19 12:11:12 +0200 |
---|---|---|
committer | Marek Vasut | 2020-04-28 13:52:52 +0200 |
commit | 3c425fc0ef4de31d350695c74db7a3d6be0379b6 (patch) | |
tree | 2cb37697929153f104058967550427e4e4f17ffa /drivers | |
parent | cff0144e4cd0825dda0ae46aa739f0681839cc3a (diff) |
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')
-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 a118283984c..8533abfd930 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: |