[U-Boot] [PATCH v2 2/3] drivers: usb: gadget: ether: remove unused variable tmp
Mugunthan V N
mugunthanvnm at ti.com
Wed Dec 14 14:32:01 CET 2016
tmp variable in eth_bind() is never used any where, so remove it.
Signed-off-by: Mugunthan V N <mugunthanvnm at ti.com>
---
drivers/usb/gadget/ether.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index bcc8be86a5..e8d9e4a9c9 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -2000,7 +2000,6 @@ static int eth_bind(struct usb_gadget *gadget)
struct usb_ep *in_ep, *out_ep, *status_ep = NULL;
int status = -ENOMEM;
int gcnum;
- u8 tmp[7];
/* these flags are only ever cleared; compiler take note */
#ifndef CONFIG_USB_ETH_CDC
@@ -2206,9 +2205,6 @@ autoconf_fail:
*/
get_ether_addr(dev_addr, dev->net->enetaddr);
- memset(tmp, 0, sizeof(tmp));
- memcpy(tmp, dev->net->enetaddr, sizeof(dev->net->enetaddr));
-
get_ether_addr(host_addr, dev->host_mac);
sprintf(ethaddr, "%02X%02X%02X%02X%02X%02X",
--
2.11.0
More information about the U-Boot
mailing list