summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/brocade/bna/bnad.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-09-28 00:31:58 +0200
committerDavid S. Miller <davem@davemloft.net>2012-09-28 00:31:58 +0200
commite905ed57baa82e15ce9c158a8f1e81f171042504 (patch)
tree814ac070f202fc4b81d0f3340a3bde194d8931f6 /drivers/net/ethernet/brocade/bna/bnad.c
parentnf_defrag_ipv6: fix oops on module unloading (diff)
downloadlinux-e905ed57baa82e15ce9c158a8f1e81f171042504.tar.xz
linux-e905ed57baa82e15ce9c158a8f1e81f171042504.zip
bna: Fix warning false positive.
GCC can't see that in all non-error-return paths we do in fact set *using_dac to something. Add an explicit initialization to remove this warning: drivers/net/ethernet/brocade/bna/bnad.c: In function ‘bnad_pci_probe’: drivers/net/ethernet/brocade/bna/bnad.c:3079:5: warning: ‘using_dac’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/net/ethernet/brocade/bna/bnad.c:3233:7: note: ‘using_dac’ was declared here Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/bnad.c')
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index b441f33258e7..ce1eac529470 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -3268,6 +3268,7 @@ bnad_pci_probe(struct pci_dev *pdev,
* Output : using_dac = 1 for 64 bit DMA
* = 0 for 32 bit DMA
*/
+ using_dac = false;
err = bnad_pci_init(bnad, pdev, &using_dac);
if (err)
goto unlock_mutex;