svn commit: r312613 - head/sys/powerpc/mpc85xx

Justin Hibbits jhibbits at FreeBSD.org
Sun Jan 22 05:49:45 UTC 2017


Author: jhibbits
Date: Sun Jan 22 05:49:43 2017
New Revision: 312613
URL: https://svnweb.freebsd.org/changeset/base/312613

Log:
  Fix use of uninitialized variable.
  
  I don't know how gcc didn't catch this.  This was caught during test building
  with clang.

Modified:
  head/sys/powerpc/mpc85xx/fsl_diu.c

Modified: head/sys/powerpc/mpc85xx/fsl_diu.c
==============================================================================
--- head/sys/powerpc/mpc85xx/fsl_diu.c	Sun Jan 22 05:45:42 2017	(r312612)
+++ head/sys/powerpc/mpc85xx/fsl_diu.c	Sun Jan 22 05:49:43 2017	(r312613)
@@ -344,7 +344,7 @@ diu_init(struct diu_softc *sc)
 static int
 diu_attach(device_t dev)
 {
-	struct edid_info *edid;
+	struct edid_info edid;
 	struct diu_softc *sc;
 	const struct videomode *videomode;
 	void *edid_cells;
@@ -384,7 +384,7 @@ diu_attach(device_t dev)
 		}
 	}
 	if (edid_cells != NULL) {
-		if (edid_parse(edid_cells, edid) != 0) {
+		if (edid_parse(edid_cells, &edid) != 0) {
 			device_printf(dev, "Error parsing EDID\n");
 			OF_prop_free(edid_cells);
 			return (ENXIO);


More information about the svn-src-all mailing list