提交 59e57f44 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric Dumazet <eric.dumazet@gmail.com>
Acked-by: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 72dccb01
...@@ -97,7 +97,7 @@ struct net_device *phonet_device_get(struct net *net) ...@@ -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_list *pndevs = phonet_device_list(net);
struct phonet_device *pnd; struct phonet_device *pnd;
struct net_device *dev; struct net_device *dev = NULL;
spin_lock_bh(&pndevs->lock); spin_lock_bh(&pndevs->lock);
list_for_each_entry(pnd, &pndevs->list, list) { list_for_each_entry(pnd, &pndevs->list, list) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册