Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hpc fix uninitialized pointer. This could have never...



details:   https://anonhg.NetBSD.org/src/rev/5b92b6febfcf
branches:  trunk
changeset: 787686:5b92b6febfcf
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jun 28 14:44:15 2013 +0000

description:
fix uninitialized pointer. This could have never worked.
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html

diffstat:

 sys/dev/hpc/hpf1275a_tty.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r f4ded7132592 -r 5b92b6febfcf sys/dev/hpc/hpf1275a_tty.c
--- a/sys/dev/hpc/hpf1275a_tty.c        Fri Jun 28 14:42:31 2013 +0000
+++ b/sys/dev/hpc/hpf1275a_tty.c        Fri Jun 28 14:44:15 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpf1275a_tty.c,v 1.26 2012/10/27 17:18:17 chs Exp $ */
+/*     $NetBSD: hpf1275a_tty.c,v 1.27 2013/06/28 14:44:15 christos Exp $ */
 
 /*
  * Copyright (c) 2004 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.26 2012/10/27 17:18:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.27 2013/06/28 14:44:15 christos Exp $");
 
 #include "opt_wsdisplay_compat.h"
 
@@ -307,7 +307,7 @@
                .cf_fstate = FSTATE_STAR,
        };
        struct lwp *l = curlwp;         /* XXX */
-       struct hpf1275a_softc *sc;
+       struct hpf1275a_softc *sc = device_private(self);
        device_t self;
        int error, s;
 
@@ -328,7 +328,7 @@
                return (EIO);
        }
 
-       tp->t_sc = device_private(self);
+       tp->t_sc = sc;
        sc->sc_tp = tp;
 
        splx(s);



Home | Main Index | Thread Index | Old Index