svn commit: r304333 - head/sys/dev/usb/net

Pyun YongHyeon yongari at FreeBSD.org
Thu Aug 18 06:35:11 UTC 2016


Author: yongari
Date: Thu Aug 18 06:35:09 2016
New Revision: 304333
URL: https://svnweb.freebsd.org/changeset/base/304333

Log:
  When usbd_transfer_setup() fails, don't call
  usbd_transfer_unsetup().

Modified:
  head/sys/dev/usb/net/if_axge.c

Modified: head/sys/dev/usb/net/if_axge.c
==============================================================================
--- head/sys/dev/usb/net/if_axge.c	Thu Aug 18 06:29:07 2016	(r304332)
+++ head/sys/dev/usb/net/if_axge.c	Thu Aug 18 06:35:09 2016	(r304333)
@@ -553,7 +553,8 @@ axge_attach(device_t dev)
 	    sc->sc_xfer, axge_config, AXGE_N_TRANSFER, sc, &sc->sc_mtx);
 	if (error) {
 		device_printf(dev, "allocating USB transfers failed\n");
-		goto detach;
+		mtx_destroy(&sc->sc_mtx);
+		return (ENXIO);
 	}
 
 	ue->ue_sc = sc;


More information about the svn-src-all mailing list