]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
qla3xxx: fix warning in drivers/net/qla3xxx.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:49:07 +0000 (16:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:49:07 +0000 (16:49 -0800)
this warning:

  drivers/net/qla3xxx.c: In function ‘ql3xxx_probe’:
  drivers/net/qla3xxx.c:3912: warning: ‘pci_using_dac’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'pci_using_dac' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qla3xxx.c

index 7671f943974c1f1015a3a0adcf62917b6dd77d01..6b7ed1a5b3b7bf8b34e8a0e61ec4a5eb34034029 100644 (file)
@@ -3917,7 +3917,7 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
        struct net_device *ndev = NULL;
        struct ql3_adapter *qdev = NULL;
        static int cards_found = 0;
-       int pci_using_dac, err;
+       int uninitialized_var(pci_using_dac), err;
 
        err = pci_enable_device(pdev);
        if (err) {