Skip to content

Commit

Permalink
qla3xxx: fix warning in drivers/net/qla3xxx.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar authored and David S. Miller committed Nov 26, 2008
1 parent f166400 commit be5a3c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit be5a3c6

Please sign in to comment.