This prevents a crash if tftpboot is given a bad filename. Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com> --- drivers/usb/gadget/ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index e39714b..1542ca3 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2401,7 +2401,8 @@ static int usb_eth_init(struct eth_device *netdev, bd_t *bd) } packet_received = 0; - rx_submit(dev, dev->rx_req, 0); + if (dev->rx_req) + rx_submit(dev, dev->rx_req, 0); return 0; fail: return -1; -- 1.8.1.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot