Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pcmcia Fix use of uninitialized variable.



details:   https://anonhg.NetBSD.org/src/rev/1e24aef0bef8
branches:  trunk
changeset: 779999:1e24aef0bef8
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jul 05 12:53:22 2012 +0000

description:
Fix use of uninitialized variable.

diffstat:

 sys/dev/pcmcia/wdc_pcmcia.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 7abcae194d9e -r 1e24aef0bef8 sys/dev/pcmcia/wdc_pcmcia.c
--- a/sys/dev/pcmcia/wdc_pcmcia.c       Thu Jul 05 10:56:52 2012 +0000
+++ b/sys/dev/pcmcia/wdc_pcmcia.c       Thu Jul 05 12:53:22 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_pcmcia.c,v 1.118 2012/07/02 18:15:48 bouyer Exp $ */
+/*     $NetBSD: wdc_pcmcia.c,v 1.119 2012/07/05 12:53:22 joerg Exp $ */
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.118 2012/07/02 18:15:48 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.119 2012/07/05 12:53:22 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -294,12 +294,12 @@
        sc->wdc_chanlist[0] = &sc->ata_channel;
        sc->sc_wdcdev.sc_atac.atac_channels = sc->wdc_chanlist;
        sc->sc_wdcdev.sc_atac.atac_nchannels = 1;
-       sc->sc_wdcdev.wdc_maxdrives = wdcp ? wdcp->wdc_ndrive : 2;
        sc->ata_channel.ch_channel = 0;
        sc->ata_channel.ch_atac = &sc->sc_wdcdev.sc_atac;
        sc->ata_channel.ch_queue = &sc->wdc_chqueue;
        wdcp = pcmcia_product_lookup(pa, wdc_pcmcia_products,
            wdc_pcmcia_nproducts, sizeof(wdc_pcmcia_products[0]), NULL);
+       sc->sc_wdcdev.wdc_maxdrives = wdcp ? wdcp->wdc_ndrive : 2;
        wdc_init_shadow_regs(&sc->ata_channel);
 
        error = wdc_pcmcia_enable(self, 1);



Home | Main Index | Thread Index | Old Index