Module Name: src Committed By: mbalmer Date: Fri Sep 2 06:50:21 UTC 2011
Modified Files: src/sys/dev/gpio: gpio.c Log Message: Make sure error is not used unitialized when sc->sc_attach_busy is 0. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/dev/gpio/gpio.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/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.40 src/sys/dev/gpio/gpio.c:1.41 --- src/sys/dev/gpio/gpio.c:1.40 Wed Aug 31 12:20:35 2011 +++ src/sys/dev/gpio/gpio.c Fri Sep 2 06:50:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.40 2011/08/31 12:20:35 mbalmer Exp $ */ +/* $NetBSD: gpio.c,v 1.41 2011/09/02 06:50:20 mbalmer Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.40 2011/08/31 12:20:35 mbalmer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.41 2011/09/02 06:50:20 mbalmer Exp $"); /* * General Purpose Input/Output framework. @@ -724,6 +724,7 @@ NULL, NULL, NULL, NULL)) return EPERM; + error = 0; mutex_enter(&sc->sc_mtx); while (sc->sc_attach_busy) { error = cv_wait_sig(&sc->sc_attach, &sc->sc_mtx);