svn commit: r367882 - head/sys/dev/dwc

Emmanuel Vadot manu at FreeBSD.org
Fri Nov 20 11:29:21 UTC 2020


Author: manu
Date: Fri Nov 20 11:29:20 2020
New Revision: 367882
URL: https://svnweb.freebsd.org/changeset/base/367882

Log:
  if_dwc: dwc_get_hwaddr cannot fail, change return to void
  
  No functional changes intended

Modified:
  head/sys/dev/dwc/if_dwc.c

Modified: head/sys/dev/dwc/if_dwc.c
==============================================================================
--- head/sys/dev/dwc/if_dwc.c	Fri Nov 20 11:29:00 2020	(r367881)
+++ head/sys/dev/dwc/if_dwc.c	Fri Nov 20 11:29:20 2020	(r367882)
@@ -1153,7 +1153,7 @@ out:
 	return (0);
 }
 
-static int
+static void
 dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr)
 {
 	uint32_t hi, lo, rnd;
@@ -1185,8 +1185,6 @@ dwc_get_hwaddr(struct dwc_softc *sc, uint8_t *hwaddr)
 		hwaddr[4] = rnd >>  8;
 		hwaddr[5] = rnd >>  0;
 	}
-
-	return (0);
 }
 
 #define	GPIO_ACTIVE_LOW 1
@@ -1336,10 +1334,7 @@ dwc_attach(device_t dev)
 	}
 
 	/* Read MAC before reset */
-	if (dwc_get_hwaddr(sc, macaddr)) {
-		device_printf(sc->dev, "can't get mac\n");
-		return (ENXIO);
-	}
+	dwc_get_hwaddr(sc, macaddr);
 
 	/* Reset the PHY if needed */
 	if (dwc_reset(dev) != 0) {


More information about the svn-src-head mailing list