phonet: phonet_device_get() fix
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 27 Jul 2009 15:03:18 +0000 (08:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2009 15:03:18 +0000 (08:03 -0700)
net/phonet/pn_dev.c: In function `phonet_device_get':
net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pn_dev.c

index 6b30cc1b94b8c4b14494eb4751878023d3d96f84..5ae4c01e8388d5db0ab7d0322857cf9dd86ed319 100644 (file)
@@ -97,7 +97,7 @@ struct net_device *phonet_device_get(struct net *net)
 {
        struct phonet_device_list *pndevs = phonet_device_list(net);
        struct phonet_device *pnd;
-       struct net_device *dev;
+       struct net_device *dev = NULL;
 
        spin_lock_bh(&pndevs->lock);
        list_for_each_entry(pnd, &pndevs->list, list) {