projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cff0144
)
usb: ether: avoid NULL check before free()
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Sun, 19 Apr 2020 10:11:12 +0000
(12:11 +0200)
committer
Marek Vasut
<marek.vasut+renesas@gmail.com>
Tue, 28 Apr 2020 11:52:52 +0000
(13:52 +0200)
free() checks if its argument is NULL. Do not duplicate this check.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/usb/gadget/ether.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/ether.c
b/drivers/usb/gadget/ether.c
index a118283984c2d2e58226a93a2d26c11f58f71b8d..8533abfd9301835caa591727ae6395f2d8e67460 100644
(file)
--- 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: