Module Name:    src
Committed By:   macallan
Date:           Fri Jan  1 20:48:15 UTC 2016

Modified Files:
        src/sys/dev/pci: voyager.c

Log Message:
zero out struct i2cbus_attach_args and i2c_controller before messing with
them


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/pci/voyager.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/voyager.c
diff -u src/sys/dev/pci/voyager.c:1.10 src/sys/dev/pci/voyager.c:1.11
--- src/sys/dev/pci/voyager.c:1.10	Sat Mar 29 19:28:25 2014
+++ src/sys/dev/pci/voyager.c	Fri Jan  1 20:48:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyager.c,v 1.10 2014/03/29 19:28:25 christos Exp $	*/
+/*	$NetBSD: voyager.c,v 1.11 2016/01/01 20:48:15 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -26,7 +26,7 @@
  */
  
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.10 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.11 2016/01/01 20:48:15 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -244,6 +244,8 @@ voyager_attach(device_t parent, device_t
 		voyager_gpio_dir(sc, 0xffffffff, GPIO_I2C_BITS);
 		
 		/* Fill in the i2c tag */
+		memset(&sc->sc_i2c, 0, sizeof(sc->sc_i2c));
+		memset(&iba, 0, sizeof(iba));
 		sc->sc_i2c.ic_cookie = sc;
 		sc->sc_i2c.ic_acquire_bus = voyager_i2c_acquire_bus;
 		sc->sc_i2c.ic_release_bus = voyager_i2c_release_bus;

Reply via email to