From: Eric Dumazet Date: Mon, 27 Jul 2009 15:03:18 +0000 (-0700) Subject: phonet: phonet_device_get() fix X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cf39c4c572dc54adbdf8933d1e6cd87ee94d8fc0;p=openwrt%2Fstaging%2Fblogic.git phonet: phonet_device_get() fix 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 Acked-by: RĂ©mi Denis-Courmont Signed-off-by: David S. Miller --- diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index b0d6ddd82a9d..c2b77a698695 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c @@ -96,7 +96,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) {